Add new class: NSSpawnPoint.
This commit is contained in:
parent
2838900a82
commit
0bb88774a2
6 changed files with 88 additions and 0 deletions
26
platform/base_scripts.pk3dir/def/spawns.def
Normal file
26
platform/base_scripts.pk3dir/def/spawns.def
Normal file
|
@ -0,0 +1,26 @@
|
|||
entityDef info_player_start
|
||||
{
|
||||
editor_mins "-16 -16 -36"
|
||||
editor_maxs "16 16 36"
|
||||
editor_description "Singleplayer Spawn Point"
|
||||
|
||||
spawnclass NSSpawnPoint
|
||||
}
|
||||
|
||||
entityDef info_player_deathmatch
|
||||
{
|
||||
editor_mins "-16 -16 -36"
|
||||
editor_maxs "16 16 36"
|
||||
editor_description "Deathmatch Spawn Point"
|
||||
|
||||
spawnclass NSSpawnPoint
|
||||
}
|
||||
|
||||
entityDef info_player_coop
|
||||
{
|
||||
editor_mins "-16 -16 -36"
|
||||
editor_maxs "16 16 36"
|
||||
editor_description "Cooperative Spawn Point"
|
||||
|
||||
spawnclass NSSpawnPoint
|
||||
}
|
|
@ -27,3 +27,5 @@ enum
|
|||
BOTINFO_TEAM_GOALCAPTURE, /* where to go when goal-item present */
|
||||
BOTINFO_END /* end destination */
|
||||
};
|
||||
|
||||
.float botinfo;
|
26
src/shared/NSSpawnPoint.h
Normal file
26
src/shared/NSSpawnPoint.h
Normal file
|
@ -0,0 +1,26 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Vera Visions LLC.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/** This entity class represents spawnpoints.
|
||||
*/
|
||||
class NSSpawnPoint:NSPointTrigger
|
||||
{
|
||||
public:
|
||||
void NSSpawnPoint(void);
|
||||
|
||||
/* overrides */
|
||||
virtual void Respawn(void);
|
||||
};
|
31
src/shared/NSSpawnPoint.qc
Normal file
31
src/shared/NSSpawnPoint.qc
Normal file
|
@ -0,0 +1,31 @@
|
|||
/*
|
||||
* Copyright (c) 2024 Vera Visions LLC.
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software for any
|
||||
* purpose with or without fee is hereby granted, provided that the above
|
||||
* copyright notice and this permission notice appear in all copies.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF MIND, USE, DATA OR PROFITS, WHETHER
|
||||
* IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
void
|
||||
NSSpawnPoint::NSSpawnPoint(void)
|
||||
{
|
||||
}
|
||||
|
||||
void
|
||||
NSSpawnPoint::Respawn(void)
|
||||
{
|
||||
InitPointTrigger();
|
||||
setorigin_safe(this, GetSpawnOrigin());
|
||||
SetSize(VEC_HULL_MIN, VEC_HULL_MAX);
|
||||
SetSolid(SOLID_NOT);
|
||||
SetMovetype(MOVETYPE_NONE);
|
||||
botinfo = BOTINFO_SPAWNPOINT;
|
||||
}
|
|
@ -78,6 +78,7 @@ string __fullspawndata;
|
|||
#include "../gs-entbase/server/defs.h"
|
||||
#endif
|
||||
|
||||
#include "../botlib/botinfo.h"
|
||||
#include "sentences.h"
|
||||
|
||||
#include "NSIO.h"
|
||||
|
@ -95,6 +96,7 @@ string __fullspawndata;
|
|||
#include "NSMonster.h"
|
||||
#include "NSSquadMonster.h"
|
||||
#include "NSTalkMonster.h"
|
||||
#include "NSSpawnPoint.h"
|
||||
#include "NSProjectile.h"
|
||||
#include "NSItem.h"
|
||||
#include "NSSpraylogo.h"
|
||||
|
|
|
@ -17,6 +17,7 @@ NSMonster.qc
|
|||
NSSquadMonster.qc
|
||||
NSTalkMonster.qc
|
||||
NSProjectile.qc
|
||||
NSSpawnPoint.qc
|
||||
NSItem.qc
|
||||
NSPortal.qc
|
||||
NSDebris.qc
|
||||
|
|
Loading…
Reference in a new issue