info_tfgoal: add hack to make some maps work with possible bugs work better
This commit is contained in:
parent
c033b256ea
commit
8aba849f6b
1 changed files with 18 additions and 2 deletions
|
@ -112,8 +112,20 @@ class info_tfgoal:NSRenderableEntity
|
|||
virtual void(entity) Touch;
|
||||
virtual void(void) Respawn;
|
||||
virtual void(string, string) SpawnKey;
|
||||
virtual void Spawned(void);
|
||||
};
|
||||
|
||||
void
|
||||
info_tfgoal::Spawned(void)
|
||||
{
|
||||
super::Spawned();
|
||||
|
||||
/* HACK: goals without a targetname and TFGOAL_REMOVED can't work */
|
||||
if (m_tfgState == TFGOAL_REMOVED && !targetname) {
|
||||
m_tfgState = TFGOAL_INACTIVE;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
info_tfgoal::Touch(entity eToucher)
|
||||
{
|
||||
|
@ -125,13 +137,17 @@ info_tfgoal::Touch(entity eToucher)
|
|||
player pl = (player)eToucher;
|
||||
|
||||
/* check for state */
|
||||
if (m_tfgState != TFGOAL_INACTIVE)
|
||||
if (m_tfgState != TFGOAL_INACTIVE) {
|
||||
print("not active\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* check for team eligibility */
|
||||
if (m_iTeamUses)
|
||||
if (eToucher.team != m_iTeamUses)
|
||||
if (eToucher.team != m_iTeamUses) {
|
||||
print("not eligble\n");
|
||||
return;
|
||||
}
|
||||
|
||||
/* check for the must-have carry */
|
||||
if (m_dMustCarry) {
|
||||
|
|
Loading…
Reference in a new issue