GS-Entbase: Add some QUAKED comments for the base spawn point entities,
info_player_start, info_player_deathmatch and info_player_coop.
This commit is contained in:
parent
31c7354dda
commit
fea005ba96
|
@ -380,6 +380,7 @@ CBaseMonster::NewRoute(vector destination)
|
|||
p.m_iCurNode = numnodes - 1;
|
||||
p.m_pRoute = nodelist;
|
||||
|
||||
//traceline(p.origin, dest, MOVE_NORMAL, this);
|
||||
tracebox(p.origin, p.mins, p.maxs, dest, MOVE_NORMAL, this);
|
||||
|
||||
/* can we walk directly to our target destination? */
|
||||
|
@ -388,10 +389,14 @@ CBaseMonster::NewRoute(vector destination)
|
|||
"Walking directly to last node\n");
|
||||
p.m_iCurNode = -1;
|
||||
} else {
|
||||
dprint("^2CBaseMonster::^3NewRoute^7: " \
|
||||
"Path obstructed, calculating route\n");
|
||||
|
||||
/* run through all nodes, mark the closest direct path possible */
|
||||
for (int i = 0; i < p.m_iNodes; i++) {
|
||||
vector vecDest = p.m_pRoute[i].m_vecDest;
|
||||
tracebox(p.origin, p.mins, p.maxs, vecDest, TRUE, p);
|
||||
//traceline(p.origin, vecDest, MOVE_NORMAL, this);
|
||||
|
||||
if (trace_fraction == 1.0) {
|
||||
p.m_iCurNode = i;
|
||||
|
@ -401,6 +406,9 @@ CBaseMonster::NewRoute(vector destination)
|
|||
}
|
||||
}
|
||||
|
||||
if (!g_nodes_present)
|
||||
return;
|
||||
|
||||
ClearRoute();
|
||||
|
||||
if (!m_iNodes) {
|
||||
|
|
|
@ -91,14 +91,10 @@ CBaseNPC::TalkPlayerIdle(void)
|
|||
{
|
||||
if (m_iSequenceState != SEQUENCESTATE_NONE)
|
||||
return;
|
||||
|
||||
if (spawnflags & MSF_PREDISASTER) {
|
||||
if (spawnflags & MSF_PREDISASTER)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_flNextSentence > time) {
|
||||
if (m_flNextSentence > time)
|
||||
return;
|
||||
}
|
||||
|
||||
for (entity p = world; (p = find(p, ::classname, "player"));) {
|
||||
/* Find players in a specific radius */
|
||||
|
@ -120,14 +116,10 @@ CBaseNPC::TalkPlayerAsk(void)
|
|||
{
|
||||
if (m_iSequenceState != SEQUENCESTATE_NONE)
|
||||
return;
|
||||
|
||||
if (spawnflags & MSF_PREDISASTER) {
|
||||
if (spawnflags & MSF_PREDISASTER)
|
||||
return;
|
||||
}
|
||||
|
||||
if (m_flNextSentence > time) {
|
||||
if (m_flNextSentence > time)
|
||||
return;
|
||||
}
|
||||
|
||||
for (entity p = world; (p = find(p, ::classname, "player"));) {
|
||||
/* Find players in a specific radius */
|
||||
|
@ -362,8 +354,10 @@ CBaseNPC::Physics(void)
|
|||
input_timelength = frametime;
|
||||
input_angles = v_angle;
|
||||
|
||||
/* make sure we're forgetting about enemies and attack states in sequence */
|
||||
if (m_iSequenceState != SEQUENCESTATE_NONE) {
|
||||
m_eEnemy = m_eFollowing = __NULL__;
|
||||
m_eEnemy = __NULL__;
|
||||
m_iMState = MONSTER_IDLE;
|
||||
}
|
||||
|
||||
/* override whatever we did above with this */
|
||||
|
@ -433,7 +427,8 @@ CBaseNPC::Physics(void)
|
|||
frame1time, ModelEvent);
|
||||
}
|
||||
|
||||
void CBaseNPC::Respawn(void)
|
||||
void
|
||||
CBaseNPC::Respawn(void)
|
||||
{
|
||||
CBaseMonster::Respawn();
|
||||
m_eFollowing = world;
|
||||
|
|
|
@ -14,9 +14,62 @@
|
|||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/*QUAKED info_player_start (1 1 1) (-16 -16 -36) (16 16 36)
|
||||
"targetname" Name
|
||||
|
||||
Player spawn position for single-player games.
|
||||
This entity is also used in Counter-Strike (2000) and its beta versions to mark
|
||||
spawn-positions for the Counter-Terrorist team.
|
||||
|
||||
In order for a player to spawn here, the game needs to be in singleplayer mode
|
||||
or multiplayer coop (if info_player_coop spawn points don't exist).
|
||||
|
||||
Mods may choose to have additional fields that are not documented here as part
|
||||
of the entity, keep that in mind.
|
||||
|
||||
Trivia:
|
||||
This entity was introduced in Quake (1996).
|
||||
*/
|
||||
|
||||
/*QUAKED info_player_deathmatch (1 1 1) (-16 -16 -36) (16 16 36)
|
||||
"targetname" Name
|
||||
|
||||
Player spawn position for deathmatch games.
|
||||
This entity is also used in Counter-Strike (2000) and its beta versions to mark
|
||||
spawn-positions for the Terrorist team.
|
||||
|
||||
In order for a player to spawn here, the game needs to be in a compatible
|
||||
multiplayer mode. This (with the exception of Counter-Strike) excludes team
|
||||
based modes.
|
||||
|
||||
Mods may choose to have additional fields that are not documented here as part
|
||||
of the entity, keep that in mind.
|
||||
|
||||
Trivia:
|
||||
This entity was introduced in Quake (1996).
|
||||
*/
|
||||
|
||||
/*QUAKED info_player_coop (1 1 1) (-16 -16 -36) (16 16 36)
|
||||
"targetname" Name
|
||||
|
||||
Player spawn position for cooperative games.
|
||||
|
||||
In order for a player to spawn here, the game needs to take place on a map
|
||||
for singleplayer with cooperative multiplayer enabled.
|
||||
If this entity isn't present on such a mode, info_player_start will be the
|
||||
fallback spawn-point.
|
||||
|
||||
Mods may choose to have additional fields that are not documented here as part
|
||||
of the entity, keep that in mind.
|
||||
|
||||
Trivia:
|
||||
This entity was introduced in Quake (1996).
|
||||
*/
|
||||
|
||||
CLASSEXPORT(info_node, info_notnull)
|
||||
CLASSEXPORT(info_target, info_notnull)
|
||||
CLASSEXPORT(env_sound, info_null)
|
||||
CLASSEXPORT(env_sun, info_null)
|
||||
CLASSEXPORT(info_intermission, info_null)
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue