Cleaned up warnings.

This commit is contained in:
Marco Cawthorne 2020-03-31 10:09:23 +02:00
parent 5cb0ad1bb3
commit de877436aa
14 changed files with 21 additions and 29 deletions

View file

@ -44,7 +44,7 @@ void trigger_camera::Trigger(void)
Client_TriggerCamera(eActivator, origin, angles, m_flWait);
dprint( sprintf( "^2trigger_camera::^3Trigger^7: Camera at %v, %v, for %f sec/s requested\n",
this.classname, origin, angles, m_flWait ) );
origin, angles, m_flWait ) );
}
void trigger_camera::trigger_camera(void)

View file

@ -144,7 +144,7 @@ void trigger_changelevel::trigger_changelevel(void)
vector Landmark_GetSpot(void)
{
info_landmark landmark;
info_landmark landmark = world;
/* a trigger_transition may share the same targetname, thus we do this */
for (entity e = world; (e = find(e, ::classname, "info_landmark"));) {
@ -158,9 +158,7 @@ vector Landmark_GetSpot(void)
}
/* return something useful at least */
if (!landmark) {
entity ips = find(world, ::classname, "info_player_start");
print(sprintf("^1ERROR^7: Landmark_GetSpot: Cannot find startspot '%s'!\n",startspot));
return ips.origin;
}
entity ips = find(world, ::classname, "info_player_start");
print(sprintf("^1ERROR^7: Landmark_GetSpot: Cannot find startspot '%s'!\n",startspot));
return ips.origin;
}

View file

@ -51,21 +51,20 @@ Game_ClientDisconnect(void)
}
void
Game_ClientKill(void)
Game_ClientKill(player pl)
{
Damage_Apply(self, self, self.health, WEAPON_NONE, DMG_SKIP_ARMOR);
Damage_Apply(pl, pl, pl.health, WEAPON_NONE, DMG_SKIP_ARMOR);
}
void
Game_PlayerPreThink(void)
Game_PlayerPreThink(player pl)
{
}
void
Game_PlayerPostThink(void)
Game_PlayerPostThink(player pl)
{
player pl = (player)self;
Animation_PlayerUpdate();
pl.SendFlags |= PLAYER_KEEPALIVE;
@ -197,13 +196,8 @@ Game_SetChangeParms(void)
}
void
Game_PutClientInServer(void)
Game_PutClientInServer(player pl)
{
if (self.classname != "player") {
spawnfunc_player();
}
player pl = (player)self;
entity spot;
pl.classname = "player";
pl.health = self.max_health = 100;

View file

@ -127,7 +127,7 @@ monster_alien_controller::IdleNoise(void)
if (m_flIdleTime > time) {
return;
}
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, con_sndidle.length));
Sound(con_sndidle[rand]);

View file

@ -153,7 +153,7 @@ monster_alien_grunt::IdleNoise(void)
if (m_flIdleTime > time) {
return;
}
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, ag_sndidle.length));
Sound(ag_sndidle[rand]);

View file

@ -113,7 +113,7 @@ monster_bigmomma::IdleNoise(void)
return;
}
/* timing needs to adjusted as sounds conflict */
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, gon_sndidle.length));
Sound(gon_sndidle[rand]);

View file

@ -135,7 +135,7 @@ monster_bullchicken::IdleNoise(void)
return;
}
/* timing needs to adjusted as sounds conflict */
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, bull_sndidle.length));
Sound(bull_sndidle[rand]);

View file

@ -116,7 +116,7 @@ monster_gargantua::IdleNoise(void)
return;
}
/* timing needs to adjusted as sounds conflict */
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, garg_sndidle.length));
Sound(garg_sndidle[rand]);

View file

@ -156,7 +156,7 @@ monster_headcrab::IdleNoise(void)
if (m_flIdleTime > time) {
return;
}
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, hc_sndidle.length));
Sound(hc_sndidle[rand]);

View file

@ -150,7 +150,7 @@ monster_houndeye::IdleNoise(void)
if (m_flIdleTime > time) {
return;
}
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, he_sndidle.length));
Sound(he_sndidle[rand]);

View file

@ -136,7 +136,7 @@ monster_ichthyosaur::IdleNoise(void)
if (m_flIdleTime > time) {
return;
}
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, ichy_sndidle.length));
Sound(ichy_sndidle[rand]);

View file

@ -98,7 +98,7 @@ monster_nihilanth::IdleNoise(void)
return;
}
/* timing needs to adjusted as sounds conflict */
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, nil_sndidle.length));
Sound(nil_sndidle[rand]);

View file

@ -124,7 +124,7 @@ monster_tentacle::IdleNoise(void)
return;
}
/* timing needs to adjusted as sounds conflict */
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, te_sndidle.length));
Sound(te_sndidle[rand]);

View file

@ -168,7 +168,7 @@ monster_zombie::IdleNoise(void)
if (m_flIdleTime > time) {
return;
}
m_flIdleTime = time + 2.0f + random(0,5);
m_flIdleTime = time + random(2,10);
int rand = floor(random(0, zo_sndidle.length));
Sound(zo_sndidle[rand]);