info_tfgoal/item_tfgoal: fix model not being parsed as it should.
This commit is contained in:
parent
802ce3a478
commit
86efabc07a
2 changed files with 33 additions and 23 deletions
|
@ -61,6 +61,14 @@ typedef enumflags
|
||||||
/* point entity version */
|
/* point entity version */
|
||||||
class info_tfgoal:NSRenderableEntity
|
class info_tfgoal:NSRenderableEntity
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
void(void) info_tfgoal;
|
||||||
|
virtual void(entity) Touch;
|
||||||
|
virtual void(void) Respawn;
|
||||||
|
virtual void(string, string) SpawnKey;
|
||||||
|
virtual void Spawned(void);
|
||||||
|
|
||||||
|
private:
|
||||||
string m_strName;
|
string m_strName;
|
||||||
string m_strActivatedSound;
|
string m_strActivatedSound;
|
||||||
|
|
||||||
|
@ -108,11 +116,7 @@ class info_tfgoal:NSRenderableEntity
|
||||||
string m_voxOwnerTeam; /* owner team */
|
string m_voxOwnerTeam; /* owner team */
|
||||||
string m_voxNonOwnerTeams; /* non-owner team */
|
string m_voxNonOwnerTeams; /* non-owner team */
|
||||||
|
|
||||||
void(void) info_tfgoal;
|
string m_strSpawnModel; /* because we mangle it */
|
||||||
virtual void(entity) Touch;
|
|
||||||
virtual void(void) Respawn;
|
|
||||||
virtual void(string, string) SpawnKey;
|
|
||||||
virtual void Spawned(void);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -286,7 +290,7 @@ info_tfgoal::Respawn(void)
|
||||||
{
|
{
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetMovetype(MOVETYPE_NONE);
|
SetMovetype(MOVETYPE_NONE);
|
||||||
SetModel(GetSpawnString("model"));
|
SetModel(m_strSpawnModel);
|
||||||
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
||||||
SetOrigin(GetSpawnVector("origin"));
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
team = m_iTeamUses;
|
team = m_iTeamUses;
|
||||||
|
@ -305,12 +309,13 @@ info_tfgoal::SpawnKey(string strKey, string strValue)
|
||||||
case "noise":
|
case "noise":
|
||||||
m_strActivatedSound = strValue;
|
m_strActivatedSound = strValue;
|
||||||
break;
|
break;
|
||||||
|
case "model":
|
||||||
case "mdl":
|
case "mdl":
|
||||||
model = strValue;
|
m_strSpawnModel = strValue;
|
||||||
|
|
||||||
if (serverkeyfloat("*bspversion") == 0) {
|
if (serverkeyfloat("*bspversion") == 0) {
|
||||||
model = strreplace("progs", "models", model);
|
m_strSpawnModel = strreplace("progs", "models", model);
|
||||||
model = strreplace("tf_stan", "flag", model);
|
m_strSpawnModel = strreplace("tf_stan", "flag", model);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -450,7 +455,7 @@ i_t_g::Respawn(void)
|
||||||
{
|
{
|
||||||
SetSolid(SOLID_BSPTRIGGER);
|
SetSolid(SOLID_BSPTRIGGER);
|
||||||
SetMovetype(MOVETYPE_NONE);
|
SetMovetype(MOVETYPE_NONE);
|
||||||
SetModel(GetSpawnString("model"));
|
SetModel(m_strSpawnModel);
|
||||||
SetOrigin(GetSpawnVector("origin"));
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
Hide();
|
Hide();
|
||||||
team = m_iTeamUses;
|
team = m_iTeamUses;
|
||||||
|
|
|
@ -60,6 +60,16 @@ typedef enum
|
||||||
|
|
||||||
class item_tfgoal:NSRenderableEntity
|
class item_tfgoal:NSRenderableEntity
|
||||||
{
|
{
|
||||||
|
public:
|
||||||
|
void(void) item_tfgoal;
|
||||||
|
virtual void(entity) Touch;
|
||||||
|
virtual void(void) Respawn;
|
||||||
|
virtual void(string, string) SpawnKey;
|
||||||
|
virtual void(NSClientPlayer) DropReturnable;
|
||||||
|
virtual void(void) TeamOwnerReturns;
|
||||||
|
virtual void(void) Spawned;
|
||||||
|
|
||||||
|
private:
|
||||||
float m_dItemID;
|
float m_dItemID;
|
||||||
|
|
||||||
int m_iTeamUses;
|
int m_iTeamUses;
|
||||||
|
@ -89,14 +99,7 @@ class item_tfgoal:NSRenderableEntity
|
||||||
string m_returnOwner;
|
string m_returnOwner;
|
||||||
|
|
||||||
float m_flPausetime;
|
float m_flPausetime;
|
||||||
|
string m_strSpawnModel; /* because we mangle it */
|
||||||
void(void) item_tfgoal;
|
|
||||||
virtual void(entity) Touch;
|
|
||||||
virtual void(void) Respawn;
|
|
||||||
virtual void(string, string) SpawnKey;
|
|
||||||
virtual void(NSClientPlayer) DropReturnable;
|
|
||||||
virtual void(void) TeamOwnerReturns;
|
|
||||||
virtual void(void) Spawned;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -214,7 +217,7 @@ item_tfgoal::Touch(entity eToucher)
|
||||||
void
|
void
|
||||||
item_tfgoal::Respawn(void)
|
item_tfgoal::Respawn(void)
|
||||||
{
|
{
|
||||||
SetModel(GetSpawnString("model"));
|
SetModel(m_strSpawnModel);
|
||||||
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
||||||
SetSolid(SOLID_TRIGGER);
|
SetSolid(SOLID_TRIGGER);
|
||||||
SetOrigin(GetSpawnVector("origin"));
|
SetOrigin(GetSpawnVector("origin"));
|
||||||
|
@ -262,13 +265,15 @@ item_tfgoal::SpawnKey(string strKey, string strValue)
|
||||||
case "noise":
|
case "noise":
|
||||||
m_strSound = strValue;
|
m_strSound = strValue;
|
||||||
break;
|
break;
|
||||||
|
case "model":
|
||||||
case "mdl":
|
case "mdl":
|
||||||
model = strValue;
|
m_strSpawnModel = strValue;
|
||||||
|
|
||||||
if (serverkeyfloat("*bspversion") == BSPVER_Q1) {
|
if (serverkeyfloat("*bspversion") == 0) {
|
||||||
model = strreplace("progs", "models", model);
|
m_strSpawnModel = strreplace("progs", "models", model);
|
||||||
model = strreplace("tf_stan", "flag", model);
|
m_strSpawnModel = strreplace("tf_stan", "flag", model);
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "goal_no":
|
case "goal_no":
|
||||||
m_dItemID = stof(strValue);
|
m_dItemID = stof(strValue);
|
||||||
|
|
Loading…
Reference in a new issue