trigger_changelevel: check if we're inside a trigger_transition under
certain conditions (and only compare the activator...)
This commit is contained in:
parent
df2a385bbd
commit
08e112e128
2 changed files with 10 additions and 1 deletions
|
@ -136,6 +136,14 @@ trigger_changelevel::Change(void)
|
|||
m_activator = find(world, ::classname, "player");
|
||||
}
|
||||
|
||||
if (m_strLandmark) {
|
||||
for (entity e = world; (e = find(e, ::classname, "trigger_transition"));) {
|
||||
if (e.targetname == m_strLandmark)
|
||||
if (IsInside(m_activator, e) == FALSE)
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
/* a trigger_transition may share the same targetname, thus we do this */
|
||||
for (entity e = world; (e = find(e, ::classname, "info_landmark"));) {
|
||||
info_landmark lm = (info_landmark)e;
|
||||
|
|
|
@ -181,7 +181,8 @@ NSSurfacePropEntity::SpawnKey(string strKey, string strValue)
|
|||
{
|
||||
switch (strKey) {
|
||||
case "health":
|
||||
health = stof(strValue);
|
||||
int h = stoi(strValue);
|
||||
health = (float)h;
|
||||
m_oldHealth = health;
|
||||
break;
|
||||
case "propdata":
|
||||
|
|
Loading…
Reference in a new issue