CSMultiplayerRules: choose an info_player_start when info_vip_start is unavailable (fixes as_riverside and older maps like it)

This commit is contained in:
Marco Cawthorne 2023-10-10 19:13:25 -07:00
parent ee035cdded
commit 219e00ec69
Signed by: eukara
GPG Key ID: CE2032F0A2882A22
2 changed files with 13 additions and 38 deletions

View File

@ -821,6 +821,9 @@ CSMultiplayerRules::PlayerFindSpawn(float t)
point = m_eLastCTSpawn;
} else if (t == TEAM_VIP) {
point = find(world, ::classname, "info_vip_start");
if (!point)
point = find(m_eLastTSpawn, ::classname, "info_player_start");
}
if (point == world) {
@ -1019,6 +1022,7 @@ CSMultiplayerRules::PlayerMakeSpectator(NSClientPlayer pp)
player pl = (player)pp;
pl.MakeTempSpectator();
PlayerClearWeaponry(pl);
pl.view_ofs = g_vec_null;
}
/*

View File

@ -89,38 +89,8 @@ class hostage_entity:NSTalkMonster
virtual void(void) OnPlayerUse;
virtual void(void) Pain;
virtual void(void) Death;
virtual int(void) AnimIdle;
virtual int(void) AnimWalk;
virtual int(void) AnimRun;
//virtual float(void) GetWalkSpeed;
};
#if 0
float
hostage_entity::GetWalkSpeed(void)
{
return 128;
}
#endif
int
hostage_entity::AnimIdle(void)
{
return HOSA_IDLE1;
}
int
hostage_entity::AnimWalk(void)
{
return HOSA_WALK;
}
int
hostage_entity::AnimRun(void)
{
return HOSA_RUN;
}
void
hostage_entity::OnPlayerUse(void)
{
@ -220,7 +190,15 @@ hostage_entity::Death(void)
void
hostage_entity::Respawn(void)
{
NSTalkMonster::Respawn();
spawnflags |= MSF_MULTIPLAYER;
model = "models/hostage.mdl";
netname = "Hostage";
base_health = 100;
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
super::Respawn();
m_iFlags |= MONSTER_CANFOLLOW;
m_iUsedOnce = FALSE;
PlayerUse = OnPlayerUse;
@ -252,12 +230,5 @@ hostage_entity::hostage_entity(void)
m_talkFollow = "";
m_talkStopFollow = "";
spawnflags |= MSF_MULTIPLAYER;
model = "models/hostage.mdl";
netname = "Hostage";
base_health = 100;
base_mins = [-16,-16,0];
base_maxs = [16,16,72];
NSTalkMonster::NSTalkMonster();
g_cs_hostagestotal++;
}