CBaseEntity: Added support for the 'scale' field in the rendering, also made the codebase use the builtin target/targetname
This commit is contained in:
parent
0b75388ace
commit
fd826a226d
40 changed files with 137 additions and 121 deletions
|
@ -61,6 +61,7 @@ enumflags
|
|||
BASEFL_CHANGED_MOVETYPE,
|
||||
BASEFL_CHANGED_EFFECTS,
|
||||
BASEFL_CHANGED_BODY,
|
||||
BASEFL_CHANGED_SCALE,
|
||||
#ifdef GS_RENDERFX
|
||||
BASEFL_CHANGED_RENDERCOLOR,
|
||||
BASEFL_CHANGED_RENDERAMT,
|
||||
|
|
|
@ -147,6 +147,8 @@ CBaseEntity::predraw(void)
|
|||
RenderFXPass();
|
||||
#endif
|
||||
|
||||
scale = m_flScale;
|
||||
|
||||
/* mouth flapping action */
|
||||
bonecontrol5 = getchannellevel(this, CHAN_VOICE) * 20;
|
||||
frame1time += clframetime;
|
||||
|
@ -264,6 +266,9 @@ void CBaseEntity::ReadEntity(float flChanged)
|
|||
m_iBody = readbyte();
|
||||
setcustomskin(this, "", sprintf("geomset 1 %i\n", m_iBody));
|
||||
}
|
||||
if (flChanged & BASEFL_CHANGED_SCALE) {
|
||||
m_flScale = readfloat();
|
||||
}
|
||||
|
||||
#ifdef GS_RENDERFX
|
||||
if (flChanged & BASEFL_CHANGED_RENDERFX) {
|
||||
|
|
|
@ -24,6 +24,7 @@ class CBaseEntity
|
|||
#endif
|
||||
|
||||
int m_iBody;
|
||||
float m_flScale;
|
||||
float m_flSentenceTime;
|
||||
sound_t *m_pSentenceQue;
|
||||
int m_iSentenceCount;
|
||||
|
|
|
@ -95,7 +95,7 @@ ambient_generic::UseNormal(entity act, int state)
|
|||
{
|
||||
sound(this, CHAN_VOICE, m_strActivePath, m_flVolume, m_flRadius, m_flPitch);
|
||||
dprint(sprintf("^2ambient_generic::^3UseNormal^7: %s plays `%s`\n",
|
||||
m_strTarget, m_strActivePath));
|
||||
target, m_strActivePath));
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -103,12 +103,12 @@ ambient_generic::UseLoop(entity act, int state)
|
|||
{
|
||||
if (m_iToggleSwitch == TRUE) {
|
||||
dprint(sprintf("^2ambient_generic::^3UseLoop^7: %s stops `%s`\n",
|
||||
m_strTarget, m_strActivePath));
|
||||
target, m_strActivePath));
|
||||
m_strActivePath = "common/null.wav";
|
||||
} else {
|
||||
m_strActivePath = m_strSoundPath;
|
||||
dprint(sprintf("^2ambient_generic::^3UseLoop^7: %s plays `%s`\n",
|
||||
m_strTarget, m_strActivePath));
|
||||
target, m_strActivePath));
|
||||
}
|
||||
|
||||
m_iToggleSwitch = 1 - m_iToggleSwitch;
|
||||
|
|
|
@ -89,6 +89,15 @@ CBaseEntity::SetBody(int newBody)
|
|||
SendFlags |= BASEFL_CHANGED_BODY;
|
||||
}
|
||||
void
|
||||
CBaseEntity::SetScale(float newScale)
|
||||
{
|
||||
if (newScale == m_flScale)
|
||||
return;
|
||||
|
||||
m_flScale = newScale;
|
||||
SendFlags |= BASEFL_CHANGED_SCALE;
|
||||
}
|
||||
void
|
||||
CBaseEntity::SetAngles(vector newAngles)
|
||||
{
|
||||
if (newAngles == angles)
|
||||
|
@ -206,6 +215,9 @@ CBaseEntity::SendEntity(entity ePEnt, float fChanged)
|
|||
if (fChanged & BASEFL_CHANGED_BODY) {
|
||||
WriteByte(MSG_ENTITY, m_iBody);
|
||||
}
|
||||
if (fChanged & BASEFL_CHANGED_SCALE) {
|
||||
WriteFloat(MSG_ENTITY, m_flScale);
|
||||
}
|
||||
|
||||
#ifdef GS_RENDERFX
|
||||
if (fChanged & BASEFL_CHANGED_RENDERFX) {
|
||||
|
@ -259,7 +271,7 @@ CBaseEntity::ParentUpdate(void)
|
|||
}
|
||||
|
||||
if (m_parent) {
|
||||
entity p = find(world, CBaseEntity::m_strTargetName, m_parent);
|
||||
entity p = find(world, ::targetname, m_parent);
|
||||
|
||||
if (!p) {
|
||||
return;
|
||||
|
@ -286,6 +298,9 @@ CBaseEntity::CBaseEntity(void)
|
|||
int nfields = tokenize(__fullspawndata);
|
||||
for (int i = 1; i < (nfields - 1); i += 2) {
|
||||
switch (argv(i)) {
|
||||
case "scale":
|
||||
m_flScale = stof(argv(i+1));
|
||||
break;
|
||||
case "origin":
|
||||
origin = stov(argv(i+1));
|
||||
break;
|
||||
|
@ -304,12 +319,10 @@ CBaseEntity::CBaseEntity(void)
|
|||
}
|
||||
break;
|
||||
case "targetname":
|
||||
m_strTargetName = argv(i+1);
|
||||
targetname = __NULL__;
|
||||
targetname = argv(i+1);
|
||||
break;
|
||||
case "target":
|
||||
m_strTarget = argv(i+1);
|
||||
target = __NULL__;
|
||||
target = argv(i+1);
|
||||
break;
|
||||
case "color":
|
||||
m_vecRenderColor = stov(argv(i+1));
|
||||
|
@ -351,7 +364,7 @@ CBaseEntity::CBaseEntity(void)
|
|||
m_oldflRenderAmt = m_flRenderAmt;
|
||||
m_oldvecRenderColor = m_vecRenderColor;
|
||||
m_oldflRenderAmt = m_flRenderAmt;
|
||||
m_oldstrTarget = m_strTarget;
|
||||
m_oldstrTarget = target;
|
||||
|
||||
if (m_oldModel != "") {
|
||||
precache_model(m_oldModel);
|
||||
|
@ -366,7 +379,7 @@ CBaseEntity::Respawn(void)
|
|||
SetSolid(m_oldSolid);
|
||||
SetAngles(m_oldAngle);
|
||||
SetOrigin(m_oldOrigin);
|
||||
m_strTarget = m_oldstrTarget;
|
||||
target = m_oldstrTarget;
|
||||
|
||||
#ifdef GS_RENDERFX
|
||||
SetRenderFX(m_oldiRenderFX);
|
||||
|
|
|
@ -16,10 +16,9 @@
|
|||
|
||||
class CBaseEntity
|
||||
{
|
||||
string m_strTarget;
|
||||
string m_oldstrTarget; /* needed due to trigger_changetarget */
|
||||
string m_strTargetName;
|
||||
int m_iBody;
|
||||
float m_flScale;
|
||||
|
||||
/* respawn */
|
||||
string m_oldModel;
|
||||
|
@ -63,6 +62,7 @@ class CBaseEntity
|
|||
virtual void(float) SetSkin;
|
||||
virtual void(float) SetSolid;
|
||||
virtual void(int) SetBody;
|
||||
virtual void(float) SetScale;
|
||||
virtual void(vector) SetAngles;
|
||||
virtual void(vector) SetOrigin;
|
||||
virtual void(vector, vector) SetSize;
|
||||
|
|
|
@ -336,7 +336,7 @@ CBaseMonster::FreeState(void)
|
|||
/* trigger when required */
|
||||
if (m_strRouteEnded) {
|
||||
CBaseTrigger trigger = 0;
|
||||
trigger = (CBaseTrigger)find(trigger, CBaseTrigger::m_strTargetName, m_strRouteEnded);
|
||||
trigger = (CBaseTrigger)find(trigger, ::targetname, m_strRouteEnded);
|
||||
if (!trigger) {
|
||||
dprint(sprintf("^1CBaseMonster::^3FreeState^7: %s doesn't exist. Won't trigger\n", m_strRouteEnded));
|
||||
}
|
||||
|
@ -385,14 +385,14 @@ CBaseMonster::CheckRoute(void)
|
|||
flDist = floor(vlen(evenpos - origin));
|
||||
|
||||
if (flDist < 8) {
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s reached node\n", this.m_strTargetName));
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s reached node\n", this.targetname));
|
||||
m_iCurNode--;
|
||||
velocity = [0,0,0]; /* clamp friction */
|
||||
}
|
||||
|
||||
if (m_iCurNode < -1) {
|
||||
ClearRoute();
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s reached end\n", this.m_strTargetName));
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s reached end\n", this.targetname));
|
||||
|
||||
/* mark that we've ended a sequence, if we're in one and que anim */
|
||||
if (m_iSequenceState == SEQUENCESTATE_ACTIVE) {
|
||||
|
@ -401,12 +401,12 @@ CBaseMonster::CheckRoute(void)
|
|||
m_iSequenceState = SEQUENCESTATE_ENDING;
|
||||
think = FreeState;
|
||||
nextthink = time + duration;
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s overriding anim for %f seconds (modelindex %d, frame %d)\n", this.m_strTargetName, duration, modelindex, m_flSequenceEnd));
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s overriding anim for %f seconds (modelindex %d, frame %d)\n", this.targetname, duration, modelindex, m_flSequenceEnd));
|
||||
} else {
|
||||
/* we still need to trigger targets */
|
||||
think = FreeState;
|
||||
nextthink = time;
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s has no anim, finished sequence.\n", this.m_strTargetName));
|
||||
dprint(sprintf("^2CBaseMonster::^3CheckRoute^7: %s has no anim, finished sequence.\n", this.targetname));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,10 +52,10 @@ class CBaseTrigger:CBaseEntity
|
|||
void
|
||||
CBaseTrigger::UseTargets(entity act, int state)
|
||||
{
|
||||
for (entity f = world; (f = find(f, CBaseTrigger::m_strTargetName, m_strTarget));) {
|
||||
for (entity f = world; (f = find(f, ::targetname, target));) {
|
||||
CBaseTrigger trigger = (CBaseTrigger)f;
|
||||
dprint(sprintf("^2%s::^3UseTargets^7: Triggering %s `%s` from %s\n",
|
||||
this.classname, f.classname, trigger.m_strTargetName, act.classname));
|
||||
this.classname, f.classname, trigger.targetname, act.classname));
|
||||
if (trigger.Trigger != __NULL__) {
|
||||
trigger.Trigger(act, state);
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ CBaseTrigger::UseTargets(entity act, int state)
|
|||
}*/
|
||||
|
||||
if (m_strKillTarget) {
|
||||
entity eKill = find(world, CBaseTrigger::m_strTargetName, m_strKillTarget);
|
||||
entity eKill = find(world, ::targetname, m_strKillTarget);
|
||||
if (eKill) {
|
||||
remove(eKill);
|
||||
}
|
||||
|
@ -88,12 +88,12 @@ CBaseTrigger::UseTargets_Delay(entity act, int state, float fDelay)
|
|||
}
|
||||
|
||||
dprint(sprintf("^2%s::^3UseTargets_Delay^7: Triggering `%s`\n",
|
||||
this.classname, m_strTarget));
|
||||
this.classname, target));
|
||||
|
||||
CBaseTrigger eTimer = spawn(CBaseTrigger);
|
||||
eTimer.owner = act;
|
||||
eTimer.think = Entities_UseTargets_Delay_Think;
|
||||
eTimer.m_strTarget = m_strTarget;
|
||||
eTimer.target = target;
|
||||
eTimer.nextthink = time + fDelay;
|
||||
eTimer.health = state; /* ugly */
|
||||
}
|
||||
|
@ -116,7 +116,7 @@ CBaseTrigger::GetMaster(void)
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
t = (CBaseTrigger)find(world, CBaseTrigger::m_strTarget, m_strMaster);
|
||||
t = (CBaseTrigger)find(world, ::target, m_strMaster);
|
||||
|
||||
/* we couldn't find it, so let's not even bother going further */
|
||||
if (!t) {
|
||||
|
@ -127,10 +127,10 @@ CBaseTrigger::GetMaster(void)
|
|||
|
||||
/*if (t.GetValue() == 1)
|
||||
dprint(sprintf("^2%s::^3GetMaster^7: %s learns %s ^2POSITIVE\n",
|
||||
this.classname, m_strTargetName, m_strMaster));
|
||||
this.classname, targetname, m_strMaster));
|
||||
else
|
||||
dprint(sprintf("^2%s::^3GetMaster^7: %s learns %s ^1NEGATIVE\n",
|
||||
this.classname, m_strTargetName, m_strMaster));*/
|
||||
this.classname, targetname, m_strMaster));*/
|
||||
|
||||
return t.GetValue();
|
||||
}
|
||||
|
|
|
@ -70,11 +70,11 @@ void env_laser::think(void)
|
|||
nextthink = time + 0.1;
|
||||
}
|
||||
|
||||
t = (CBaseTrigger)find(world, CBaseEntity::m_strTargetName, m_strLaserDest);
|
||||
t = (CBaseTrigger)find(world, ::targetname, m_strLaserDest);
|
||||
angles = t.origin;
|
||||
|
||||
if (!t) {
|
||||
print(sprintf("^1env_laser::^3think^7: %s has no valid target. Aborting\n", m_strTargetName));
|
||||
print(sprintf("^1env_laser::^3think^7: %s has no valid target. Aborting\n", targetname));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -167,7 +167,7 @@ void env_laser::ParentUpdate(void)
|
|||
}*/
|
||||
|
||||
if (m_parent) {
|
||||
entity p = find(world, CBaseEntity::m_strTargetName, m_parent);
|
||||
entity p = find(world, ::targetname, m_parent);
|
||||
|
||||
if (!p) {
|
||||
return;
|
||||
|
|
|
@ -43,11 +43,11 @@ void
|
|||
env_render::Trigger(entity act, int state)
|
||||
{
|
||||
for (entity e = world;
|
||||
(e = find(e, CBaseEntity::m_strTargetName, m_strTarget));) {
|
||||
(e = find(e, ::targetname, target));) {
|
||||
CBaseEntity trigger = (CBaseEntity)e;
|
||||
|
||||
dprint(sprintf("^2env_render::^3Trigger^7: with spawnflags %d\n", spawnflags));
|
||||
dprint(sprintf("\tTarget: %s\n", m_strTarget));
|
||||
dprint(sprintf("\tTarget: %s\n", target));
|
||||
if (!(spawnflags & SF_NORENDERMODE)) {
|
||||
dprint(sprintf("\tMode change from %d to %d\n", trigger.m_iRenderMode, m_iRenderMode));
|
||||
trigger.SetRenderMode(m_iRenderMode);
|
||||
|
|
|
@ -72,7 +72,7 @@ enum
|
|||
|
||||
class func_door:CBaseTrigger
|
||||
{
|
||||
string m_strTargetClose;
|
||||
string targetClose;
|
||||
vector m_vecPos1;
|
||||
vector m_vecPos2;
|
||||
vector m_vecDest;
|
||||
|
@ -123,8 +123,8 @@ func_door::Arrived(void)
|
|||
sound(this, CHAN_VOICE, "common/null.wav", 1.0f, ATTN_NORM);
|
||||
}
|
||||
|
||||
if (m_strTargetClose)
|
||||
for (entity f = world; (f = find(f, CBaseTrigger::m_strTargetName, m_strTargetClose));) {
|
||||
if (targetClose)
|
||||
for (entity f = world; (f = find(f, ::targetname, targetClose));) {
|
||||
CBaseTrigger trigger = (CBaseTrigger)f;
|
||||
if (trigger.Trigger != __NULL__) {
|
||||
trigger.Trigger(this, TRIG_TOGGLE);
|
||||
|
@ -387,7 +387,7 @@ func_door::Respawn(void)
|
|||
m_iValue = 1;
|
||||
}
|
||||
|
||||
if (m_strTargetName) {
|
||||
if (targetname) {
|
||||
m_iLocked = TRUE;
|
||||
}
|
||||
|
||||
|
@ -416,7 +416,7 @@ func_door::func_door(void)
|
|||
m_flWait = stof(argv(i+1));
|
||||
break;
|
||||
case "netname":
|
||||
m_strTargetClose = argv(i+1);
|
||||
targetClose = argv(i+1);
|
||||
netname = __NULL__;
|
||||
break;
|
||||
case "dmg":
|
||||
|
|
|
@ -40,7 +40,7 @@ enumflags
|
|||
|
||||
class func_door_rotating:CBaseTrigger
|
||||
{
|
||||
string m_strTargetClose;
|
||||
string targetClose;
|
||||
|
||||
int m_iMoveSnd;
|
||||
int m_iStopSnd;
|
||||
|
@ -136,8 +136,8 @@ void func_door_rotating::Returned(void)
|
|||
touch = Touch;
|
||||
}
|
||||
|
||||
if (m_strTargetClose)
|
||||
for (entity f = world; (f = find(f, CBaseTrigger::m_strTargetName, m_strTargetClose));) {
|
||||
if (targetClose)
|
||||
for (entity f = world; (f = find(f, ::targetname, targetClose));) {
|
||||
CBaseTrigger trigger = (CBaseTrigger)f;
|
||||
if (trigger.Trigger != __NULL__) {
|
||||
trigger.Trigger(this, TRIG_TOGGLE);
|
||||
|
@ -299,7 +299,7 @@ void func_door_rotating::RotToDest(vector vDestAngle, void(void) func)
|
|||
float flTravelLength, flTravelTime;
|
||||
|
||||
if (!m_flSpeed) {
|
||||
dprint(sprintf("^1func_door_rotating::^3RotToDest^7: No speed defined for %s!", m_strTargetName));
|
||||
dprint(sprintf("^1func_door_rotating::^3RotToDest^7: No speed defined for %s!", targetname));
|
||||
func_door_rotating::Respawn();
|
||||
return;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ void func_door_rotating::Respawn(void)
|
|||
SetSolid(SOLID_NOT);
|
||||
}
|
||||
|
||||
if (m_strTargetName) {
|
||||
if (targetname) {
|
||||
m_iLocked = TRUE;
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ void func_door_rotating::func_door_rotating(void)
|
|||
m_flWait = stof(argv(i+1));
|
||||
break;
|
||||
case "netname":
|
||||
m_strTargetClose = argv(i+1);
|
||||
targetClose = argv(i+1);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
|
|
|
@ -47,10 +47,10 @@ void func_guntarget::Move(void)
|
|||
vector vel_to_pos;
|
||||
path_corner node;
|
||||
|
||||
node = (path_corner)find(world, CBaseTrigger::m_strTargetName, m_strTarget);
|
||||
node = (path_corner)find(world, ::targetname, target);
|
||||
|
||||
if (!node) {
|
||||
dprint(sprintf("^1func_guntarget::^3Move^7: Path node for %s not found!\n", m_strTargetName));
|
||||
dprint(sprintf("^1func_guntarget::^3Move^7: Path node for %s not found!\n", targetname));
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -76,8 +76,8 @@ void func_guntarget::NextPath(void)
|
|||
{
|
||||
path_corner node;
|
||||
|
||||
print(sprintf("^2func_guntarget::^3NextPath^7: Talking to current target %s... ", m_strTarget));
|
||||
node = (path_corner)find(world, path_corner::m_strTargetName, m_strTarget);
|
||||
print(sprintf("^2func_guntarget::^3NextPath^7: Talking to current target %s... ", target));
|
||||
node = (path_corner)find(world, ::targetname, target);
|
||||
|
||||
if (!node) {
|
||||
print("^1FAILED.\n");
|
||||
|
@ -85,10 +85,10 @@ void func_guntarget::NextPath(void)
|
|||
print("^2SUCCESS.\n");
|
||||
}
|
||||
|
||||
m_strTarget = node.m_strTarget;
|
||||
target = node.target;
|
||||
velocity = [0,0,0];
|
||||
|
||||
if (m_strTarget) {
|
||||
if (target) {
|
||||
Move();
|
||||
}
|
||||
}
|
||||
|
@ -102,7 +102,7 @@ void func_guntarget::Death(void)
|
|||
return;
|
||||
}
|
||||
|
||||
for (a = world; (a = find(a, CBaseTrigger::m_strTargetName, m_strFire));) {
|
||||
for (a = world; (a = find(a, ::targetname, m_strFire));) {
|
||||
CBaseTrigger trigger = (CBaseTrigger)a;
|
||||
trigger.Trigger(g_dmg_eAttacker, TRIG_TOGGLE);
|
||||
}
|
||||
|
|
|
@ -125,11 +125,11 @@ func_mortar_field::FireControlled(void)
|
|||
for (f = world; (f = find(f, ::classname, "momentary_rot_button"));) {
|
||||
momentary_rot_button l = (momentary_rot_button) f;
|
||||
|
||||
if (l.m_strTargetName == m_strXController) {
|
||||
if (l.targetname == m_strXController) {
|
||||
mX = l;
|
||||
}
|
||||
|
||||
if (l.m_strTargetName == m_strYController) {
|
||||
if (l.targetname == m_strYController) {
|
||||
mY = l;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ func_tankcontrols::PlayerUse(void)
|
|||
return;
|
||||
}
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, m_strTarget));) {
|
||||
for (f = world; (f = find(f, ::targetname, target));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "func_tank" || f.classname == "func_tankmortar") {
|
||||
tank = (CBaseVehicle)f;
|
||||
|
|
|
@ -105,7 +105,6 @@ func_tankmortar::SpriteSmoke(vector org)
|
|||
setorigin(smoke, org);
|
||||
smoke.think = Die;
|
||||
smoke.nextthink = time + 0.1f;
|
||||
smoke.effects = EF_FLAG2;
|
||||
smoke.scale = m_flSpriteScale;
|
||||
}
|
||||
|
||||
|
@ -124,7 +123,6 @@ func_tankmortar::SpriteFlash(vector org)
|
|||
setorigin(smoke, org);
|
||||
smoke.think = Die;
|
||||
smoke.nextthink = time + 0.1f;
|
||||
smoke.effects = EF_FLAG2;
|
||||
smoke.scale = m_flSpriteScale;
|
||||
}
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ func_tracktrain::CheckPathFW(void)
|
|||
CBaseEntity current, next;
|
||||
current = (CBaseEntity)m_ePath;
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, current.m_strTarget));) {
|
||||
for (f = world; (f = find(f, ::targetname, current.target));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
CBaseTrigger oldtrig;
|
||||
|
@ -95,7 +95,7 @@ func_tracktrain::CheckPathRV(void)
|
|||
CBaseEntity current, next;
|
||||
current = (CBaseEntity)m_ePath;
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTarget, current.m_strTargetName));) {
|
||||
for (f = world; (f = find(f, ::target, current.targetname));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
next = f;
|
||||
|
@ -117,13 +117,13 @@ func_tracktrain::UpdateAngles(void)
|
|||
CBaseEntity reallyold, reallynew;
|
||||
entity f;
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTarget, m_eOldPath.m_strTargetName));) {
|
||||
for (f = world; (f = find(f, ::target, m_eOldPath.targetname));) {
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
reallyold = f;
|
||||
}
|
||||
}
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, m_ePath.m_strTarget));) {
|
||||
for (f = world; (f = find(f, ::targetname, m_ePath.target));) {
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
reallynew = f;
|
||||
}
|
||||
|
@ -229,7 +229,7 @@ func_tracktrain::Realign(void)
|
|||
|
||||
first = second = t = f = __NULL__;
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTarget, m_strTargetName));) {
|
||||
for (f = world; (f = find(f, ::target, targetname));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "func_tracktraincontrols") {
|
||||
t = f;
|
||||
|
@ -247,8 +247,8 @@ func_tracktrain::Realign(void)
|
|||
}
|
||||
|
||||
/* we rotate and position ourselves after the first path_track/corner */
|
||||
strFirst = m_strTarget;
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, strFirst));) {
|
||||
strFirst = target;
|
||||
for (f = world; (f = find(f, ::targetname, strFirst));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
first = (CBaseEntity)f;
|
||||
|
@ -256,8 +256,8 @@ func_tracktrain::Realign(void)
|
|||
}
|
||||
|
||||
/* now get the second one... */
|
||||
strSecond = first.m_strTarget;
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, strSecond));) {
|
||||
strSecond = first.target;
|
||||
for (f = world; (f = find(f, ::targetname, strSecond));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
second = (CBaseEntity)f;
|
||||
|
|
|
@ -112,7 +112,7 @@ func_train::GoToTarget(void)
|
|||
vector vecVelocity;
|
||||
vector vecWorldPos;
|
||||
|
||||
eNode = find(world, CBaseTrigger::m_strTargetName, m_strTarget);
|
||||
eNode = find(world, ::targetname, target);
|
||||
|
||||
if (!eNode) {
|
||||
return;
|
||||
|
@ -146,7 +146,7 @@ void
|
|||
func_train::NextPath(void)
|
||||
{
|
||||
path_corner eNode;
|
||||
eNode = (path_corner)find(world, CBaseTrigger::m_strTargetName, m_strTarget);
|
||||
eNode = (path_corner)find(world, ::targetname, target);
|
||||
|
||||
if (!eNode) {
|
||||
return;
|
||||
|
@ -169,12 +169,12 @@ func_train::NextPath(void)
|
|||
SetOrigin(eNode.origin - (mins + maxs) * 0.5);
|
||||
m_flSpeed = eNode.m_flSpeed;
|
||||
m_flWait = eNode.m_flWait;
|
||||
m_strTarget = eNode.m_strTarget;
|
||||
target = eNode.target;
|
||||
velocity = [0,0,0];
|
||||
|
||||
/* warp next frame */
|
||||
if (eNode.spawnflags & PC_TELEPORT) {
|
||||
print(sprintf("^1func_train::^3NextPath^7: Node %s wants %s to teleport\n", eNode.m_strTargetName, m_strTargetName));
|
||||
print(sprintf("^1func_train::^3NextPath^7: Node %s wants %s to teleport\n", eNode.targetname, targetname));
|
||||
think = NextPath;
|
||||
nextthink = ltime;
|
||||
return;
|
||||
|
@ -211,7 +211,7 @@ func_train::Respawn(void)
|
|||
|
||||
/* let's wait 1/4 a second to give the path_corner entities a chance to
|
||||
* spawn in case they're after us in the ent lump */
|
||||
m_strTarget = m_strOldTarget;
|
||||
target = m_strOldTarget;
|
||||
think = NextPath;
|
||||
nextthink = ltime + 0.25f;
|
||||
}
|
||||
|
|
|
@ -431,7 +431,7 @@ func_vehicle::Realign(void)
|
|||
|
||||
first = second = t = f = __NULL__;
|
||||
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTarget, m_strTargetName));) {
|
||||
for (f = world; (f = find(f, ::target, targetname));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "func_vehiclecontrols") {
|
||||
t = f;
|
||||
|
@ -446,8 +446,8 @@ func_vehicle::Realign(void)
|
|||
}
|
||||
|
||||
/* we rotate and position ourselves after the first path_track/corner */
|
||||
strFirst = m_strTarget;
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, strFirst));) {
|
||||
strFirst = target;
|
||||
for (f = world; (f = find(f, ::targetname, strFirst));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
first = (CBaseEntity)f;
|
||||
|
@ -455,8 +455,8 @@ func_vehicle::Realign(void)
|
|||
}
|
||||
|
||||
/* now get the second one... */
|
||||
strSecond = first.m_strTarget;
|
||||
for (f = world; (f = find(f, CBaseEntity::m_strTargetName, strSecond));) {
|
||||
strSecond = first.target;
|
||||
for (f = world; (f = find(f, ::targetname, strSecond));) {
|
||||
/* we found the right entity */
|
||||
if (f.classname == "path_track" || f.classname == "path_corner") {
|
||||
second = (CBaseEntity)f;
|
||||
|
|
|
@ -38,16 +38,16 @@ class info_null:CBaseEntity
|
|||
void
|
||||
info_null::WarnDeveloper(void)
|
||||
{
|
||||
if (!m_strTargetName)
|
||||
if (!targetname)
|
||||
return;
|
||||
|
||||
for (entity f = world; (f = find(f, CBaseEntity::m_strTarget, m_strTargetName));) {
|
||||
for (entity f = world; (f = find(f, ::target, targetname));) {
|
||||
CBaseEntity enty = (CBaseTrigger)f;
|
||||
if (enty.gflags == GF_CANRESPAWN)
|
||||
if (enty.m_strTarget == m_strTargetName) {
|
||||
if (enty.target == targetname) {
|
||||
print(sprintf("^1info_null::WarnDeveloper^7: " \
|
||||
"%s (%s) is targetting an info_null called %s\n",
|
||||
enty.m_strTargetName, enty.classname, m_strTargetName));
|
||||
enty.targetname, enty.classname, targetname));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ void
|
|||
infodecal::Respawn(void)
|
||||
{
|
||||
/* this will be invisible by default */
|
||||
if (!m_strTargetName) {
|
||||
if (!targetname) {
|
||||
/* spawn automatically, remove self */
|
||||
Trigger(this, TRIG_ON);
|
||||
} else {
|
||||
|
|
|
@ -33,7 +33,7 @@ class momentary_door:CBaseMomentary
|
|||
void
|
||||
momentary_door::customphysics(void)
|
||||
{
|
||||
entity e = find(world, CBaseEntity::m_strTargetName, m_strTarget);
|
||||
entity e = find(world, ::targetname, target);
|
||||
CBaseMomentary bl = (CBaseMomentary)e;
|
||||
|
||||
if (m_eUser != world) {
|
||||
|
|
|
@ -53,7 +53,7 @@ momentary_rot_button::PlayerUse(void)
|
|||
void
|
||||
momentary_rot_button::customphysics(void)
|
||||
{
|
||||
entity e = find(world, CBaseEntity::m_strTargetName, m_strTarget);
|
||||
entity e = find(world, ::targetname, target);
|
||||
CBaseMomentary bl = (CBaseMomentary)e;
|
||||
|
||||
if (m_eUser != world) {
|
||||
|
|
|
@ -90,7 +90,7 @@ monstermaker::Spawner(void)
|
|||
|
||||
/* apply the saved values back */
|
||||
t.origin = t.m_oldOrigin = neworg;
|
||||
t.m_strTargetName = tname;
|
||||
t.targetname = tname;
|
||||
t.spawnflags |= MSF_MULTIPLAYER;
|
||||
|
||||
/* spawn anew */
|
||||
|
@ -133,7 +133,7 @@ monstermaker::Spawner(void)
|
|||
setorigin(unit, origin);
|
||||
m_iMonsterSpawned++;
|
||||
|
||||
if (m_strTarget) {
|
||||
if (target) {
|
||||
UseTargets(this, TRIG_TOGGLE);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,10 +50,10 @@ multi_manager::Trigger(entity act, int state)
|
|||
static void mm_enttrigger (void) {
|
||||
multi_manager_sub wow = (multi_manager_sub)self;
|
||||
|
||||
entity eFind = find(world, CBaseTrigger::m_strTargetName, wow.m_strTarget);
|
||||
entity eFind = find(world, ::targetname, wow.target);
|
||||
|
||||
dprint(sprintf("^2%s::^3Trigger^7: %s (%s)\n",
|
||||
this.classname, wow.m_strTarget, eFind.classname));
|
||||
this.classname, wow.target, eFind.classname));
|
||||
|
||||
CBaseTrigger::UseTargets(wow.m_eActivator, TRIG_TOGGLE);
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ multi_manager::Trigger(entity act, int state)
|
|||
}
|
||||
|
||||
// HACK: Avoid infinite loops
|
||||
if (m_strTargetName != argv(i)) {
|
||||
if (targetname != argv(i)) {
|
||||
m_eTriggers[b].think = mm_enttrigger;
|
||||
m_eTriggers[b].nextthink = time + stof(argv(i+1));
|
||||
m_eTriggers[b].m_iValue = TRUE;
|
||||
|
@ -145,8 +145,8 @@ multi_manager::multi_manager(void)
|
|||
}
|
||||
|
||||
// HACK: Avoid infinite loops
|
||||
if (m_strTargetName != argv(i)) {
|
||||
m_eTriggers[b].m_strTarget = argv(i);
|
||||
if (targetname != argv(i)) {
|
||||
m_eTriggers[b].target = argv(i);
|
||||
m_eTriggers[b].m_oldstrTarget = argv(i);
|
||||
b++;
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ multisource::QueryTargets(void)
|
|||
int out = TRUE;
|
||||
|
||||
/* normal triggers */
|
||||
for (a = world; (a = find(a, CBaseTrigger::m_strTarget, m_strTargetName));) {
|
||||
for (a = world; (a = find(a, ::target, targetname));) {
|
||||
CBaseTrigger tTemp = (CBaseTrigger) a;
|
||||
if (cvar("developer") == 1) {
|
||||
dprint("[^1MULTISOURCE^7] ");
|
||||
|
@ -49,7 +49,7 @@ multisource::QueryTargets(void)
|
|||
} else {
|
||||
dprint(" is ^2ON^7, name: ");
|
||||
}
|
||||
dprint(tTemp.m_strTargetName);
|
||||
dprint(tTemp.targetname);
|
||||
dprint("\n");
|
||||
} else {
|
||||
/* exit out immediately as there's no point unless in-dev */
|
||||
|
@ -66,12 +66,12 @@ void
|
|||
multisource::Trigger(entity act, int unused)
|
||||
{
|
||||
if (QueryTargets() == FALSE) {
|
||||
dprint(sprintf("[^1MULTISOURCE^7] %s is inactive.\n", m_strTargetName));
|
||||
dprint(sprintf("[^1MULTISOURCE^7] %s is inactive.\n", targetname));
|
||||
m_iValue = FALSE;
|
||||
return;
|
||||
}
|
||||
|
||||
dprint(sprintf("[^1MULTISOURCE^7] %s is now active.\n", m_strTargetName));
|
||||
dprint(sprintf("[^1MULTISOURCE^7] %s is now active.\n", targetname));
|
||||
m_iValue = TRUE;
|
||||
CBaseTrigger::UseTargets(act, TRIG_TOGGLE);
|
||||
}
|
||||
|
|
|
@ -66,7 +66,7 @@ path_corner::Trigger(entity act, int state)
|
|||
return;
|
||||
}
|
||||
|
||||
for (a = world; (a = find(a, CBaseTrigger::m_strTargetName, m_strMessage));) {
|
||||
for (a = world; (a = find(a, ::targetname, m_strMessage));) {
|
||||
CBaseTrigger trigger = (CBaseTrigger)a;
|
||||
trigger.Trigger(act, state);
|
||||
m_iFired = TRUE;
|
||||
|
|
|
@ -79,7 +79,7 @@ random_speaker::Enable(void)
|
|||
|
||||
print("^2random_speaker::^3Disable^7: " \
|
||||
"%s playing %s in %d\n", \
|
||||
m_strTargetName, m_strSample, r);
|
||||
targetname, m_strSample, r);
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -87,7 +87,7 @@ random_speaker::Disable(void)
|
|||
{
|
||||
dprint("^2random_speaker::^3Disable^7: " \
|
||||
"Disabled %s playing %s\n", \
|
||||
m_strTargetName, m_strSample);
|
||||
targetname, m_strSample);
|
||||
|
||||
m_iValue = 0;
|
||||
think = __NULL__;
|
||||
|
|
|
@ -44,7 +44,7 @@ class scripted_sentence:CBaseTrigger
|
|||
void
|
||||
scripted_sentence::Trigger(entity act, int unused)
|
||||
{
|
||||
entity speaker = find(world, CBaseEntity::m_strTargetName, m_strSpeaker);
|
||||
entity speaker = find(world, ::targetname, m_strSpeaker);
|
||||
|
||||
if (!speaker) {
|
||||
print(sprintf("^1scripted_sentence::^3Trigger^7: Couldn't find %s!\n", m_strSpeaker));
|
||||
|
|
|
@ -113,7 +113,7 @@ scripted_sequence::Trigger(entity act, int unused)
|
|||
}
|
||||
|
||||
dprint(sprintf("^2scripted_sequence::^3Trigger^7: with spawnflags %d\n", spawnflags));
|
||||
f = (CBaseMonster)find(world, CBaseEntity::m_strTargetName, m_strMonster);
|
||||
f = (CBaseMonster)find(world, ::targetname, m_strMonster);
|
||||
|
||||
/* target doesn't exist/hasn't spawned */
|
||||
if (!f) {
|
||||
|
@ -133,7 +133,7 @@ scripted_sequence::Trigger(entity act, int unused)
|
|||
}
|
||||
}
|
||||
|
||||
dprint(sprintf("\tName: %s\n", m_strTargetName));
|
||||
dprint(sprintf("\tName: %s\n", targetname));
|
||||
dprint(sprintf("\tTarget: %s\n", m_strMonster));
|
||||
dprint(sprintf("\tStarted: %f\n", time));
|
||||
|
||||
|
@ -147,9 +147,9 @@ scripted_sequence::Trigger(entity act, int unused)
|
|||
}
|
||||
|
||||
/* entity to trigger after sequence ends */
|
||||
if (m_strTarget) {
|
||||
dprint(sprintf("\tTrigger when finished: %s\n", m_strTarget));
|
||||
f.m_strRouteEnded = m_strTarget;
|
||||
if (target) {
|
||||
dprint(sprintf("\tTrigger when finished: %s\n", target));
|
||||
f.m_strRouteEnded = target;
|
||||
}
|
||||
|
||||
/* mark us as having been used, for multisources. */
|
||||
|
@ -195,7 +195,7 @@ scripted_sequence::Trigger(entity act, int unused)
|
|||
f.nextthink = time;
|
||||
dprint(sprintf(
|
||||
"\t^1WARNING: %s skipping animation on script type %i\n",
|
||||
f.m_strTargetName,
|
||||
f.targetname,
|
||||
m_iMove
|
||||
));
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ scripted_sequence::InitIdle(void)
|
|||
CBaseMonster f;
|
||||
|
||||
dprint(sprintf("^2scripted_sequence::^3InitIdle^7: with spawnflags %d\n", spawnflags));
|
||||
f = (CBaseMonster)find(world, CBaseEntity::m_strTargetName, m_strMonster);
|
||||
f = (CBaseMonster)find(world, ::targetname, m_strMonster);
|
||||
|
||||
/* target doesn't exist/hasn't spawned */
|
||||
if (!f) {
|
||||
|
@ -246,7 +246,7 @@ void
|
|||
scripted_sequence::Respawn(void)
|
||||
{
|
||||
m_iEnabled = TRUE;
|
||||
m_strTarget = m_oldstrTarget;
|
||||
target = m_oldstrTarget;
|
||||
|
||||
if (m_strIdleAnim) {
|
||||
think = InitIdle;
|
||||
|
@ -261,7 +261,7 @@ scripted_sequence::scripted_sequence(void)
|
|||
for (int i = 1; i < (nfields-1); i += 2) {
|
||||
switch (argv(i)) {
|
||||
case "target":
|
||||
m_strTarget = argv(i+1);
|
||||
target = argv(i+1);
|
||||
break;
|
||||
case "m_iszEntity":
|
||||
m_strMonster = argv(i+1);
|
||||
|
@ -284,7 +284,7 @@ scripted_sequence::scripted_sequence(void)
|
|||
break;
|
||||
}
|
||||
}
|
||||
m_oldstrTarget = m_strTarget;
|
||||
m_oldstrTarget = target;
|
||||
}
|
||||
|
||||
CLASSEXPORT(aiscripted_sequence, scripted_sequence)
|
||||
|
|
|
@ -44,7 +44,7 @@ trigger_auto::Processing(void)
|
|||
CBaseTrigger::UseTargets_Delay(this, m_iTriggerState, m_flDelay);
|
||||
|
||||
if (spawnflags & 1) {
|
||||
dprint(sprintf("^2trigger_auto::^3think^7: %s triggerer removed self\n", m_strTarget));
|
||||
dprint(sprintf("^2trigger_auto::^3think^7: %s triggerer removed self\n", target));
|
||||
think = __NULL__;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ trigger_camera::Trigger(entity act, int state)
|
|||
}
|
||||
|
||||
if (m_strMoveTo) {
|
||||
entity e = find(world, CBaseTrigger::m_strTargetName, m_strMoveTo);
|
||||
entity e = find(world, ::targetname, m_strMoveTo);
|
||||
if (e) {
|
||||
angles = vectoangles(e.origin - origin);
|
||||
}
|
||||
|
|
|
@ -87,7 +87,7 @@ trigger_changelevel::Change(void)
|
|||
for (entity e = world; (e = find(e, ::classname, "info_landmark"));) {
|
||||
info_landmark lm = (info_landmark)e;
|
||||
/* found it */
|
||||
if (lm.m_strTargetName == m_strLandmark) {
|
||||
if (lm.targetname == m_strLandmark) {
|
||||
dprint(sprintf("^2trigger_changelevel::^3Change^7: Found landmark for %s\n", m_strLandmark));
|
||||
g_landmarkpos = m_activator.origin - lm.origin;
|
||||
changelevel(m_strMap, m_strLandmark);
|
||||
|
@ -164,7 +164,7 @@ Landmark_GetSpot(void)
|
|||
for (entity e = world; (e = find(e, ::classname, "info_landmark"));) {
|
||||
info_landmark lm = (info_landmark)e;
|
||||
/* found it */
|
||||
if (lm.m_strTargetName == startspot) {
|
||||
if (lm.targetname == startspot) {
|
||||
dprint(sprintf("^3Landmark_GetSpot^7: Found landmark for %s\n", startspot));
|
||||
return lm.origin + g_landmarkpos;
|
||||
}
|
||||
|
|
|
@ -37,15 +37,15 @@ trigger_changetarget::Trigger(entity act, int state)
|
|||
{
|
||||
CBaseEntity f;
|
||||
|
||||
f = (CBaseEntity)find(world, CBaseEntity::m_strTargetName, m_strTarget);
|
||||
f = (CBaseEntity)find(world, ::targetname, target);
|
||||
|
||||
if (f) {
|
||||
dprint("^2trigger_changetarget::^3Trigger^7: " \
|
||||
"Changing %s (%s) target from '%s' to '%s'\n", \
|
||||
m_strTarget, f.classname, f.m_strTarget, m_strTarget);
|
||||
target, f.classname, f.target, target);
|
||||
|
||||
/* now change the target */
|
||||
f.m_strTarget = m_strNewTarget;
|
||||
f.target = m_strNewTarget;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ trigger_counter::Trigger(entity act, int state)
|
|||
|
||||
dprint("^2trigger_counter::^3Trigger^7: " \
|
||||
"Incremented '%s' by 1 (%i/%i)\n", \
|
||||
m_strTargetName, m_iCounted, m_iMaxCount);
|
||||
targetname, m_iCounted, m_iMaxCount);
|
||||
|
||||
if (m_iCounted < m_iMaxCount)
|
||||
return;
|
||||
|
|
|
@ -82,7 +82,7 @@ trigger_hurt::touch(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (m_strTarget) {
|
||||
if (target) {
|
||||
if (spawnflags & SF_HURT_FIREONPLAYER) {
|
||||
if (other.flags & FL_CLIENT) {
|
||||
eActivator = other;
|
||||
|
|
|
@ -63,7 +63,7 @@ trigger_look::Touch(void)
|
|||
}
|
||||
|
||||
/* find the looktarget */
|
||||
lt = find(world, CBaseEntity::m_strTargetName, m_strLookTarget);
|
||||
lt = find(world, ::targetname, m_strLookTarget);
|
||||
if (!lt) {
|
||||
dprint(sprintf("^1trigger_look:Touch^7: Invalid m_strLookTarget %s!\n", m_strLookTarget));
|
||||
remove(this);
|
||||
|
|
|
@ -47,7 +47,7 @@ trigger_teleport::touch(void)
|
|||
|
||||
if (other.health > 0 || other.solid == SOLID_SLIDEBOX) {
|
||||
eActivator = other;
|
||||
entity eTarget = find(world, CBaseTrigger::m_strTargetName, m_strTarget);
|
||||
entity eTarget = find(world, ::targetname, target);
|
||||
|
||||
if (eTarget) {
|
||||
vector endpos = eTarget.origin + [0,0,16];
|
||||
|
|
|
@ -72,13 +72,11 @@ void PutClientInServer(void)
|
|||
g_grMode.PlayerSpawn(pl);
|
||||
|
||||
/* activate all game_playerspawn entities */
|
||||
for (entity a = world; (a = findfloat(a, ::gflags, GF_CANRESPAWN));) {
|
||||
CBaseEntity ent = (CBaseEntity)a;
|
||||
for (entity a = world; (a = find(a, ::targetname, "game_playerspawn"));) {
|
||||
CBaseTrigger t = (CBaseTrigger)a;
|
||||
|
||||
if (ent.m_strTargetName == "game_playerspawn") {
|
||||
CBaseTrigger t = (CBaseTrigger)a;
|
||||
if (t.Trigger)
|
||||
t.Trigger(self, TRIG_TOGGLE);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -139,7 +139,7 @@ CGameRules::IntermissionCycle(void)
|
|||
cam = (CBaseEntity)find(cam, ::classname, "info_intermission");
|
||||
|
||||
if (cam) {
|
||||
targ = (CBaseEntity)find(world, CBaseEntity::m_strTargetName, cam.m_strTarget);
|
||||
targ = (CBaseEntity)find(world, ::targetname, cam.target);
|
||||
|
||||
if (targ) {
|
||||
vector foo;
|
||||
|
|
Loading…
Reference in a new issue