When picking up laser, game would show generic weapon pickup/already-have messages instead of laser-upgrade/maxed-out messages only - fixed

This commit is contained in:
zicodxx 2010-08-12 16:43:37 +00:00
parent 2028abb6d5
commit fe198ec06b
2 changed files with 7 additions and 1 deletions

View file

@ -1,5 +1,9 @@
D1X-Rebirth Changelog
20100812
--------
main/weapon.c: When picking up laser, game would show generic weapon pickup/already-have messages instead of laser-upgrade/maxed-out messages only - fixed
20100811
--------
main/laser.c: The inital vector scaling to compensate previous frame-skipped tracking was not aligned to FrameTime. Removed that code and just divided homer_turn_base values to compensate this offset properly. Thanks to zif for hinting me to that; Added comment about the how and why of the homing missile scaling issue

View file

@ -492,7 +492,7 @@ int pick_up_primary(int weapon_index)
int cutpoint;
ubyte flag = 1<<weapon_index;
if (Players[Player_num].primary_weapon_flags & flag) { //already have
if (weapon_index!=LASER_INDEX && Players[Player_num].primary_weapon_flags & flag) { //already have
HUD_init_message(HM_DEFAULT|HM_REDUNDANT, "%s %s!", TXT_ALREADY_HAVE_THE, PRIMARY_WEAPON_NAMES(weapon_index));
return 0;
}
@ -505,6 +505,8 @@ int pick_up_primary(int weapon_index)
select_weapon(weapon_index,0,0,1);
PALETTE_FLASH_ADD(7,14,21);
if (weapon_index!=LASER_INDEX)
HUD_init_message(HM_DEFAULT, "%s!",PRIMARY_WEAPON_NAMES(weapon_index));
return 1;