In multi_leave_game check for Player_eggs_Dropped before actually dropping to prevent multiple drops in case player quits game after being killed; put console output level of multiplayer powerup cap messagers to CON_VERBOSE; Fixed small compiler warning in gamesave.c due to last commit

This commit is contained in:
zicodxx 2011-01-14 15:12:39 +01:00
parent 6e0ea332de
commit c918f54d56
4 changed files with 11 additions and 4 deletions

View file

@ -4,6 +4,7 @@ D1X-Rebirth Changelog
--------
main/credits.c, main/menu.c, main/net_udp.c, main/scores.c: Fix compile errors introduced when merging
main/collide.c, main/fireball.c, main/gamesave.c, main/gameseq.c, main/gameseq.h, main/laser.c, main/multi.c, main/multi.h, main/multibot.c, main/net_ipx.c, main/net_udp.c, main/object.c, main/powerup.c, main/powerup.h, main/weapon.c, main/weapon.h: Removed D1X implementation of multiplayer powerup capping and added D2X code to replace this (UDP-only); Added a bunch of D2X code for general and multiplayer powerup dropping to make codes more consistent to each other; Removed MULTI_PROTO_D1X_VER and MULTI_PROTO_D1X_MINOR defines since they are not needed anymore
main/gamesave.c, main/multi.c, main/object.h: In multi_leave_game check for Player_eggs_Dropped before actually dropping to prevent multiple drops in case player quits game after being killed; put console output level of multiplayer powerup cap messagers to CON_VERBOSE; Fixed small compiler warning in gamesave.c due to last commit
20110113
--------

View file

@ -55,6 +55,7 @@ COPYRIGHT 1993-1998 PARALLAX SOFTWARE CORPORATION. ALL RIGHTS RESERVED.
#include "gamefont.h"
#include "gamesave.h"
#include "textures.h"
#include "multi.h"
#include "makesig.h"
#ifndef NDEBUG

View file

@ -760,7 +760,11 @@ multi_leave_game(void)
Net_create_loc = 0;
multi_send_position(Players[Player_num].objnum);
multi_powcap_cap_objects();
drop_player_eggs(ConsoleObject);
if (!Player_eggs_dropped)
{
drop_player_eggs(ConsoleObject);
Player_eggs_dropped = 1;
}
multi_send_player_explode(MULTI_PLAYER_DROP);
}
@ -2272,8 +2276,8 @@ void multi_powcap_cap_objects()
if (PowerupsInMine[(int)type]>=MaxPowerupsAllowed[(int)type])
if(Players[Player_num].primary_weapon_flags & (1 << index))
{
con_printf(CON_NORMAL,"PIM=%d MPA=%d\n",PowerupsInMine[(int)type],MaxPowerupsAllowed[(int)type]);
con_printf(CON_NORMAL,"Killing a primary cuz there's too many! (%d)\n",type);
con_printf(CON_VERBOSE,"PIM=%d MPA=%d\n",PowerupsInMine[(int)type],MaxPowerupsAllowed[(int)type]);
con_printf(CON_VERBOSE,"Killing a primary cuz there's too many! (%d)\n",type);
Players[Player_num].primary_weapon_flags&=(~(1 << index));
}
}
@ -2291,7 +2295,7 @@ void multi_powcap_cap_objects()
Players[Player_num].secondary_ammo[index]=0;
else
Players[Player_num].secondary_ammo[index]=(MaxPowerupsAllowed[(int)type]-PowerupsInMine[(int)type]);
con_printf(CON_NORMAL,"Hey! I killed secondary type %d because PIM=%d MPA=%d\n",type,PowerupsInMine[(int)type],MaxPowerupsAllowed[(int)type]);
con_printf(CON_VERBOSE,"Hey! I killed secondary type %d because PIM=%d MPA=%d\n",type,PowerupsInMine[(int)type],MaxPowerupsAllowed[(int)type]);
}
}

View file

@ -356,6 +356,7 @@ extern object *Dead_player_camera;
extern object Follow;
extern int Player_is_dead; // !0 means player is dead!
extern int Player_exploded;
extern int Player_eggs_dropped;
extern int Death_sequence_aborted;
extern int Player_fired_laser_this_frame;