void entcs_attach(entity player)
{
- entity e = CS(player).entcs = new(entcs_sender);
+ entity e = CS(player).entcs = new_pure(entcs_sender);
e.owner = player;
setthink(e, entcs_think);
e.nextthink = time;
void ka_Initialize() // run at the start of a match, initiates game mode
{
- ka_Handler = new(ka_Handler);
+ ka_Handler = new_pure(ka_Handler);
setthink(ka_Handler, ka_Handler_CheckBall);
ka_Handler.nextthink = time;
}
kh_teams = BITS(bound(2, kh_teams, 4));
// make a KH entity for controlling the game
- kh_controller = new(kh_controller);
+ kh_controller = new_pure(kh_controller);
setthink(kh_controller, kh_Controller_Think);
kh_Controller_SetThink(0, kh_WaitForPlayers);
void nb_spawnteam(string teamname, float teamcolor)
{
LOG_TRACE("^2spawned team ", teamname);
- entity e = new(nexball_team);
+ entity e = new_pure(nexball_team);
e.netname = teamname;
e.cnt = teamcolor;
e.team = e.cnt + 1;
setblocked(this, generic_plat_blocked);
if(this.dmg && (this.message == ""))
this.message = " was squished";
- if(this.dmg && (this.message2 == ""))
+ if(this.dmg && (this.message2 == ""))
this.message2 = "was squished by";
if(this.dmg && (!this.dmgtime))
this.dmgtime = 0.25;
return;
// wait for targets to spawn
- controller = new(func_bobbing_controller);
+ controller = new_pure(func_bobbing_controller);
controller.owner = this;
controller.nextthink = time + 1;
setthink(controller, func_bobbing_controller_think);
setblocked(this, generic_plat_blocked);
if(this.dmg && (this.message == ""))
this.message = " was squished";
- if(this.dmg && (this.message2 == ""))
+ if(this.dmg && (this.message2 == ""))
this.message2 = "was squished by";
if(this.dmg && (!this.dmgtime))
this.dmgtime = 0.25;
this.active = ACTIVE_ACTIVE;
// wait for targets to spawn
- controller = new(func_fourier_controller);
+ controller = new_pure(func_fourier_controller);
controller.owner = this;
controller.nextthink = time + 1;
setthink(controller, func_fourier_controller_think);
this.cnt = this.angles_z;
// wait for targets to spawn
- controller = new(func_pendulum_controller);
+ controller = new_pure(func_pendulum_controller);
controller.owner = this;
controller.nextthink = time + 1;
setthink(controller, func_pendulum_controller_think);
this.destvec = this.origin - func_vectormamamam_origin(this, 0);
- entity controller = new(func_vectormamamam_controller);
+ entity controller = new_pure(func_vectormamamam_controller);
controller.owner = this;
controller.nextthink = time + 1;
setthink(controller, func_vectormamamam_controller_think);
{
delete(this.move_controller);
}
- controller = new(SUB_CalcMove_controller);
+ controller = new_pure(SUB_CalcMove_controller);
controller.owner = this;
this.move_controller = controller;
controller.platmovetype = this.platmovetype;
else
return;
}
- toucher.trigger_gravity_check = new(trigger_gravity_checker);
+ toucher.trigger_gravity_check = new_pure(trigger_gravity_checker);
toucher.trigger_gravity_check.enemy = this;
toucher.trigger_gravity_check.owner = toucher;
toucher.trigger_gravity_check.gravity = toucher.gravity;
//
if (this.delay)
{
- // create a temp object to fire at a later time
- entity t = new(DelayedUse);
+ // create a temp object to fire at a later time
+ entity t = new_pure(DelayedUse);
t.nextthink = time + this.delay;
setthink(t, DelayThink);
t.enemy = actor;
void Monster_Delay(entity this, int repeat_count, float defer_amnt, void(entity) func)
{
// deferred attacking, checks if monster is still alive and target is still valid before attacking
- entity e = new(Monster_Delay);
+ entity e = new_pure(Monster_Delay);
setthink(e, Monster_Delay_Action);
e.nextthink = time + defer_amnt;
if(frag_attacker != frag_target)
if(!ITEM_DAMAGE_NEEDKILL(frag_deathtype))
{
- entity dmgent = new(dmgent);
+ entity dmgent = new_pure(dmgent);
dmgent.dmg = frag_damage * autocvar_g_buffs_vengeance_damage_multiplier;
dmgent.enemy = frag_attacker;
player.superspec_flags = SSF_VERBOSE;
player.superspec_itemfilter = "";
- entity _hello = new(superspec_delayed_hello);
+ entity _hello = new_pure(superspec_delayed_hello);
_hello.enemy = player;
setthink(_hello, superspec_hello);
_hello.nextthink = time + 5;
}
else
{
+
+ static entity GiveFrags_randomweapons;
if(!GiveFrags_randomweapons)
{
- GiveFrags_randomweapons = new(GiveFrags_randomweapons);
+ GiveFrags_randomweapons = new_pure(GiveFrags_randomweapons);
}
if(warmup_stage)
#pragma once
float g_weaponarena_random_with_blaster;
-
-entity GiveFrags_randomweapons;
entity e = find(NULL, classname, "turret_manager");
if(!e)
{
- e = new(turret_manager);
+ e = new_pure(turret_manager);
setthink(e, turrets_manager_think);
e.nextthink = time + 2;
}
void wepent_link(entity wep)
{
- entity e = new(wepent_sender);
+ entity e = new_pure(wepent_sender);
e.owner = wep;
setthink(e, wepent_think);
e.nextthink = time;
.int __stat_null;
STATIC_INIT(stats)
{
- STATS = new(stats);
- // Prevent engine stats being sent
+ STATS = new_pure(stats);
+ // Prevent engine stats being sent
int r = STATS_ENGINE_RESERVE;
for (int i = 0, n = 256 - r; i < n; ++i) {
#define X(_, name, id) if (i == id) continue;
backtrace("Can't spawn eliminatedPlayers again!");
return;
}
- Net_LinkEntity(eliminatedPlayers = spawn(), false, 0, EliminatedPlayers_SendEntity);
+ Net_LinkEntity(eliminatedPlayers = new_pure(), false, 0, EliminatedPlayers_SendEntity);
eliminatedPlayers.isEliminated = isEliminated_func;
}
backtrace("Can't spawn round_handler again!");
return;
}
- entity this = round_handler = new(round_handler);
+ entity this = round_handler = new_pure(round_handler);
setthink(this, round_handler_FirstThink);
this.canRoundStart = canRoundStart_func;
{
for (int i = 0; i < NUM_TEAMS; ++i)
{
- g_team_entities[i] = spawn();
+ g_team_entities[i] = new_pure();
}
}
start_ammo_plasma = 0;
if (random_start_ammo == NULL)
{
- random_start_ammo = new(random_start_ammo);
+ random_start_ammo = new_pure(random_start_ammo);
}
start_health = cvar("g_balance_health_start");
start_armorvalue = cvar("g_balance_armor_start");