Fix compiler warnings.
This commit is contained in:
parent
620756cf4d
commit
982d2cfd21
7 changed files with 81 additions and 15 deletions
|
@ -743,7 +743,7 @@ string g_specmodes[] = {
|
|||
void
|
||||
HUD_DrawSpectator(void)
|
||||
{
|
||||
vector vecPos;
|
||||
vector vecPos = g_vec_null;
|
||||
float flSep;
|
||||
string strText;
|
||||
int iMinutes, iSeconds;
|
||||
|
|
|
@ -32,11 +32,11 @@ View_UpdateWeapon(player pl, entity vm, entity mflash)
|
|||
* thus we need to update all the net variables to
|
||||
* make sure these updates are recognized. this is
|
||||
* vile but it'll have to do for now */
|
||||
SAVE_STATE(pl.w_attack_next);
|
||||
SAVE_STATE(pl.w_idle_next);
|
||||
SAVE_STATE(pl.viewzoom);
|
||||
SAVE_STATE(pl.weapontime);
|
||||
SAVE_STATE(pl.weaponframe);
|
||||
SAVE_STATE(pl.w_attack_next)
|
||||
SAVE_STATE(pl.w_idle_next)
|
||||
SAVE_STATE(pl.viewzoom)
|
||||
SAVE_STATE(pl.weapontime)
|
||||
SAVE_STATE(pl.weaponframe)
|
||||
|
||||
/* hack, we changed the wep, move this into Game_Input/PMove */
|
||||
Weapons_Draw(pl);
|
||||
|
@ -45,11 +45,11 @@ View_UpdateWeapon(player pl, entity vm, entity mflash)
|
|||
* thus we need to update all the net variables to
|
||||
* make sure these updates are recognized. this is
|
||||
* vile but it'll have to do for now */
|
||||
ROLL_BACK(pl.w_attack_next);
|
||||
ROLL_BACK(pl.w_idle_next);
|
||||
ROLL_BACK(pl.viewzoom);
|
||||
ROLL_BACK(pl.weapontime);
|
||||
ROLL_BACK(pl.weaponframe);
|
||||
ROLL_BACK(pl.w_attack_next)
|
||||
ROLL_BACK(pl.w_idle_next)
|
||||
ROLL_BACK(pl.viewzoom)
|
||||
ROLL_BACK(pl.weapontime)
|
||||
ROLL_BACK(pl.weaponframe)
|
||||
|
||||
/* figure out when the attachments start. in FTE attachments for
|
||||
* HLMDL are treated as bones. they start at numbones + 1 */
|
||||
|
|
|
@ -28,11 +28,34 @@ Used in the assassination mode (as_* maps).
|
|||
|
||||
class func_vip_safetyzone:NSBrushTrigger
|
||||
{
|
||||
virtual void(void) Respawn;
|
||||
};
|
||||
void func_vip_safetyzone(void);
|
||||
|
||||
virtual void Respawn(void);
|
||||
virtual void Touch(entity);
|
||||
|
||||
};
|
||||
|
||||
void
|
||||
func_vip_safetyzone::func_vip_safetyzone(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
func_vip_safetyzone::Respawn(void)
|
||||
{
|
||||
InitBrushTrigger();
|
||||
}
|
||||
|
||||
void
|
||||
func_vip_safetyzone::Touch(entity eToucher)
|
||||
{
|
||||
player pl = (player)eToucher;
|
||||
|
||||
if (!(eToucher.flags & FL_CLIENT))
|
||||
return;
|
||||
|
||||
if (pl.team == TEAM_VIP) {
|
||||
Money_AddMoney(pl, 2500);
|
||||
//RoundOver(TEAM_CT, 0, FALSE);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -219,6 +219,12 @@ CSMultiplayerRules::InitPostEnts(void)
|
|||
}
|
||||
|
||||
CreateRescueZones();
|
||||
|
||||
/* get all of the vip zones */
|
||||
g_cs_vipzones = 0;
|
||||
for (entity e = world; (e = find(e, ::classname, "func_vip_safetyzone"));) {
|
||||
g_cs_vipzones++;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -449,6 +455,29 @@ CSMultiplayerRules::RestartRound(int iWipe)
|
|||
}
|
||||
}
|
||||
|
||||
/* respawn the VIP as well, but turn them back into a CT. */
|
||||
for (entity eFind = world; (eFind = findfloat(eFind, ::team, TEAM_VIP));) {
|
||||
if (!(eFind.flags & FL_CLIENT))
|
||||
continue;
|
||||
|
||||
player pl = (player)eFind;
|
||||
pl.team = TEAM_CT;
|
||||
|
||||
if (pl.health > 0 && iWipe == FALSE) {
|
||||
PlayerRespawn(pl, TEAM_CT);
|
||||
} else {
|
||||
PlayerMakeSpectator(pl);
|
||||
PlayerMakePlayable(pl, pl.charmodel);
|
||||
}
|
||||
|
||||
if (iWipe == FALSE) {
|
||||
Money_GiveTeamReward(pl);
|
||||
} else {
|
||||
pl.money = 0;
|
||||
Money_AddMoney(pl, autocvar_mp_startmoney);
|
||||
}
|
||||
}
|
||||
|
||||
/* clear the corpses/items/bombs */
|
||||
for (entity eFind = world; (eFind = find(eFind, ::classname, "remove_me"));) {
|
||||
remove(eFind);
|
||||
|
@ -645,6 +674,15 @@ CSMultiplayerRules::CountPlayers(void)
|
|||
if (eFind.health > 0)
|
||||
g_cs_alive_ct++;
|
||||
}
|
||||
for (entity eFind = world; (eFind = findfloat(eFind, ::team, TEAM_VIP));) {
|
||||
if (!(eFind.flags & FL_CLIENT))
|
||||
continue;
|
||||
|
||||
g_cs_total_ct++;
|
||||
|
||||
if (eFind.health > 0)
|
||||
g_cs_alive_ct++;
|
||||
}
|
||||
|
||||
|
||||
g_total_players = g_cs_total_t + g_cs_total_ct;
|
||||
|
|
|
@ -92,11 +92,13 @@ class hostage_entity:NSTalkMonster
|
|||
//virtual float(void) GetWalkSpeed;
|
||||
};
|
||||
|
||||
#if 0
|
||||
float
|
||||
hostage_entity::GetWalkSpeed(void)
|
||||
{
|
||||
return 128;
|
||||
}
|
||||
#endif
|
||||
|
||||
int
|
||||
hostage_entity::AnimIdle(void)
|
||||
|
|
|
@ -75,3 +75,5 @@ item_suit::Touch(entity eToucher)
|
|||
ScheduleThink(Respawn, 30.0f);
|
||||
}
|
||||
}
|
||||
|
||||
CLASSEXPORT(item_kevlar, item_suit)
|
||||
|
|
|
@ -129,7 +129,8 @@ w_knife_primary(player pl)
|
|||
/* let's calculate damage! */
|
||||
if (trace_ent.takedamage) {
|
||||
/* values taken from https://counterstrike.fandom.com/wiki/Knife */
|
||||
int dmg;
|
||||
int dmg = 0;
|
||||
|
||||
switch (trace_surface_id) {
|
||||
case BODY_HEAD:
|
||||
dmg = 60;
|
||||
|
@ -194,7 +195,7 @@ w_knife_secondary(player pl)
|
|||
/* let's calculate damage! */
|
||||
if (trace_ent.takedamage) {
|
||||
/* values taken from https://counterstrike.fandom.com/wiki/Knife */
|
||||
int dmg;
|
||||
int dmg = 0;
|
||||
switch (trace_surface_id) {
|
||||
case BODY_HEAD:
|
||||
dmg = 260;
|
||||
|
|
Loading…
Reference in a new issue