diff --git a/about.h b/about.h index 1c7e00e..ad49c1e 100644 --- a/about.h +++ b/about.h @@ -5,7 +5,7 @@ #include "client.h" #include "lobbyList.h" -#define VERSION "1.6.4" +#define VERSION "1.6.4.1" void start_about(spFontPointer font, void ( *resize )( Uint16 w, Uint16 h )); void start_help(spFontPointer font, void ( *resize )( Uint16 w, Uint16 h )); diff --git a/build/pandora/hase/PXML.xml b/build/pandora/hase/PXML.xml index 8e88bcc..f86f371 100644 --- a/build/pandora/hase/PXML.xml +++ b/build/pandora/hase/PXML.xml @@ -1,7 +1,7 @@ - + @@ -17,6 +17,9 @@ The used fonts are Pixel Mania by HiBan (CC-BY-SA) and DejaVu Sans (Public Domai Changelog ========= +1.6.4.1: +- Fixed crash with "kill above hare" weapon + 1.6.4: - Added touchscreen/mouse support - Fixed broken network support @@ -378,7 +381,7 @@ Changelog </package> <application id="hase_prototype-hase_prototype-12345" appdata="hase_prototype"> <exec command="./hase.sh"/> -<version major="1" minor="6" release="4" build="0" type="release"/> +<version major="1" minor="6" release="4" build="1" type="release"/> <!--This program's version--> <osversion major="1" minor="0" release="0" build="0"/> <!--The minimum OS version required--> diff --git a/hase.c b/hase.c index c4ea43d..4e225d5 100644 --- a/hase.c +++ b/hase.c @@ -1346,7 +1346,7 @@ int calc(Uint32 steps) { int w_nr = weapon_pos[player[active_player]->activeHare->wp_y][player[active_player]->activeHare->wp_x]; if (player[active_player]->computer && player[active_player]->activeHare) - { + { //AI if (player[active_player]->weapon_points) { @@ -1381,16 +1381,31 @@ int calc(Uint32 steps) { if (player[active_player]->weapon_points >= weapon_cost[WP_ABOVE] && ai_shoot_tries == 1) { + pHare hitted[CIRCLE_CHECKPOINTS]; + int hit_count = 0; for (j = 0; j < CIRCLE_CHECKPOINTS; j++) if (player[active_player]->activeHare->circle_checkpoint_hare[j] && spCos(j*2*SP_PI/CIRCLE_CHECKPOINTS - player[active_player]->activeHare->cam_rotation - SP_PI/2) < -SP_ONE/4) { + int k; + for (k = 0; k < hit_count; ++k) + if (hitted[k] == player[active_player]->activeHare->circle_checkpoint_hare[j]) + break; + if (k == hit_count) + { + hitted[hit_count] = player[active_player]->activeHare->circle_checkpoint_hare[j]; + hit_count++; + } + else //hare already hitted! + { + printf("Ignored second occurence of hare in checkpoint list\n"); + continue; + } pBullet bullet = (pBullet)malloc(sizeof(tBullet)); bullet->x = player[active_player]->activeHare->x; bullet->y = player[active_player]->activeHare->y; bullet->kind = WP_ABOVE; bullet->hit = player[active_player]->activeHare->circle_checkpoint_hare[j]; int d; - int k; pPlayer p; for (k = 0; k < player_count; k++) { @@ -1668,6 +1683,8 @@ int calc(Uint32 steps) int once; input_states[INPUT_BUTTON_CANCEL] = 0; player[active_player]->weapon_points-=weapon_cost[w_nr]; + pHare hitted[CIRCLE_CHECKPOINTS]; + int hit_count; if (weapon_shoot[w_nr]) { for (j = ((w_nr == WP_SHOTGUN)?-2:0); j <= ((w_nr == WP_SHOTGUN)?2:0); j++) @@ -1736,16 +1753,30 @@ int calc(Uint32 steps) break; case WP_ABOVE: once = 0; + hit_count = 0; for (j = 0; j < CIRCLE_CHECKPOINTS; j++) if (player[active_player]->activeHare->circle_checkpoint_hare[j] && spCos(j*2*SP_PI/CIRCLE_CHECKPOINTS - player[active_player]->activeHare->cam_rotation - SP_PI/2) < -SP_ONE/4) { + int k; + for (k = 0; k < hit_count; ++k) + if (hitted[k] == player[active_player]->activeHare->circle_checkpoint_hare[j]) + break; + if (k == hit_count) + { + hitted[hit_count] = player[active_player]->activeHare->circle_checkpoint_hare[j]; + hit_count++; + } + else //hare already hitted! + { + printf("Ignored second occurence of hare in checkpoint list\n"); + continue; + } pBullet bullet = (pBullet)malloc(sizeof(tBullet)); bullet->x = player[active_player]->activeHare->x; bullet->y = player[active_player]->activeHare->y; bullet->kind = WP_ABOVE; bullet->hit = player[active_player]->activeHare->circle_checkpoint_hare[j]; int d; - int k; pPlayer p; for (k = 0; k < player_count; k++) { diff --git a/hase_readme.txt b/hase_readme.txt index 4de3983..1708bbb 100644 --- a/hase_readme.txt +++ b/hase_readme.txt @@ -9,6 +9,9 @@ The music is from Kevin MacLeod (CC-BY-SA)\nwww.incompetech.com Changelog ========= +1.6.4.1: +- Fixed crash with "kill above hare" weapon + 1.6.4: - Added touchscreen/mouse support - Fixed broken network support diff --git a/make_release_packages.sh b/make_release_packages.sh index 2114433..dfe503b 100755 --- a/make_release_packages.sh +++ b/make_release_packages.sh @@ -1,6 +1,6 @@ #!/bin/bash PROGRAM="hase" -VERSION="1.6.4" +VERSION="1.6.4.1" DEST=./build/* ZIP_CALL="7z a -t7z -m0=LZMA -mmt=on -mx=9 -md=256m -mfb=512 -ms=on upload.7z" RM_CALL="rm upload.7z"