sizeincrease -80
color 0x0000FF 0x000097
+// spawn_point_red -- red team idle spawn point effect
+effect spawn_point_red
+count 37.5
+type static
+color 0xFF0F0F 0xFF0F0F
+size 1.0 2.0
+alpha 64 128 128
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 16 16 64
+velocityjitter 32 32 0
+//lightradius 200
+//lighttime 0
+//lightcolor 0.4 0.9 0.9
+
+// spawn_point_blue -- blue team idle spawn point effect
+effect spawn_point_blue
+count 37.5
+type static
+color 0x0F0FFF 0x0F0FFF
+size 1.0 2.0
+alpha 64 128 128
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 16 16 64
+velocityjitter 32 32 0
+//lightradius 200
+//lighttime 0
+//lightcolor 0.4 0.9 0.9
+
+// spawn_point_yellow -- yellow team idle spawn point effect
+effect spawn_point_yellow
+count 37.5
+type static
+color 0xFFFF0F 0xFFFF0F
+size 1.0 2.0
+alpha 64 128 128
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 16 16 64
+velocityjitter 32 32 0
+//lightradius 200
+//lighttime 0
+//lightcolor 0.4 0.9 0.9
+
+// spawn_point_pink -- pink team idle spawn point effect
+effect spawn_point_pink
+count 37.5
+type static
+color 0xFF0FFF 0xFF0FFF
+size 1.0 2.0
+alpha 64 128 128
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 16 16 64
+velocityjitter 32 32 0
+//lightradius 200
+//lighttime 0
+//lightcolor 0.4 0.9 0.9
+
+// spawn_point_neutral -- neutral idle spawn point effect
+effect spawn_point_neutral
+count 37.5
+type static
+color 0xFFFFFF 0xFFFFFF
+size 1.0 2.0
+alpha 64 128 128
+gravity -0.1
+airfriction 0.2
+liquidfriction 0.8
+originjitter 16 16 64
+velocityjitter 32 32 0
+//lightradius 200
+//lighttime 0
+//lightcolor 0.4 0.9 0.9
+
+// spawn_event_red -- red team spawning effect
+effect spawn_event_red
+count 100
+type spark
+tex 64 64
+color 0xFF0F0F 0xFF0F0F
+size 1 1
+alpha 0 256 256
+stretchfactor 0.6
+//gravity 1
+bounce 1
+originjitter 1 1 1
+velocityjitter 500 500 500
+velocitymultiplier 0.1
+airfriction 2
+effect spawn_event_red
+countabsolute 1
+type smoke
+tex 65 65
+size 100 100
+alpha 190 190 180
+sizeincrease -80
+color 0xFF0F0F 0xFF0F0F
+
+// spawn_event_blue -- blue team spawning effect
+effect spawn_event_blue
+count 100
+type spark
+tex 64 64
+color 0x0F0FFF 0x0F0FFF
+size 1 1
+alpha 0 256 256
+stretchfactor 0.6
+//gravity 1
+bounce 1
+originjitter 1 1 1
+velocityjitter 500 500 500
+velocitymultiplier 0.1
+airfriction 2
+effect spawn_event_blue
+countabsolute 1
+type smoke
+tex 65 65
+size 100 100
+alpha 190 190 180
+sizeincrease -80
+color 0x0F0FFF 0x0F0FFF
+
+// spawn_event_yellow -- yellow team spawning effect
+effect spawn_event_yellow
+count 100
+type spark
+tex 64 64
+color 0xFFFF0F 0xFFFF0F
+size 1 1
+alpha 0 256 256
+stretchfactor 0.6
+//gravity 1
+bounce 1
+originjitter 1 1 1
+velocityjitter 500 500 500
+velocitymultiplier 0.1
+airfriction 2
+effect spawn_event_yellow
+countabsolute 1
+type smoke
+tex 65 65
+size 100 100
+alpha 190 190 180
+sizeincrease -80
+color 0xFFFF0F 0xFFFF0F
+
+// spawn_event_pink -- pink team spawning effect
+effect spawn_event_pink
+count 100
+type spark
+tex 64 64
+color 0xFF0FFF 0xFF0FFF
+size 1 1
+alpha 0 256 256
+stretchfactor 0.6
+//gravity 1
+bounce 1
+originjitter 1 1 1
+velocityjitter 500 500 500
+velocitymultiplier 0.1
+airfriction 2
+effect spawn_event_pink
+countabsolute 1
+type smoke
+tex 65 65
+size 100 100
+alpha 190 190 180
+sizeincrease -80
+color 0xFF0FFF 0xFF0FFF
+
+// spawn_event_neutral -- neutral spawning effect
+effect spawn_event_neutral
+count 100
+type spark
+tex 64 64
+color 0xFFFFFF 0xFFFFFF
+size 1 1
+alpha 0 256 256
+stretchfactor 0.6
+//gravity 1
+bounce 1
+originjitter 1 1 1
+velocityjitter 500 500 500
+velocitymultiplier 0.1
+airfriction 2
+effect spawn_event_neutral
+countabsolute 1
+type smoke
+tex 65 65
+size 100 100
+alpha 190 190 180
+sizeincrease -80
+color 0xFFFFFF 0xFFFFFF
void Spawn_Draw(void)
{
- pointparticles(self.cnt, self.origin, '0 0 2', bound(0, frametime, 0.1));
+ pointparticles(self.cnt, self.origin + '0 0 28', '0 0 2', bound(0, frametime, 0.1));
}
void Ent_ReadSpawnPoint(float is_new) // entity for spawnpoint
{
- float teamnum = ReadByte();
+ float teamnum = (ReadByte() - 1);
self.origin_x = ReadShort();
self.origin_y = ReadShort();
self.origin_z = ReadShort();
+ setsize(self, PL_MIN, PL_MAX);
+ droptofloor();
+
if(is_new)
{
- switch(teamnum)
+ if(autocvar_cl_spawn_point_particles)
{
- default: self.cnt = particleeffectnum("EF_STARDUST"); break;
+ switch(teamnum)
+ {
+ case NUM_TEAM_1: self.cnt = particleeffectnum("spawn_point_red"); break;
+ case NUM_TEAM_2: self.cnt = particleeffectnum("spawn_point_blue"); break;
+ case NUM_TEAM_3: self.cnt = particleeffectnum("spawn_point_yellow"); break;
+ case NUM_TEAM_4: self.cnt = particleeffectnum("spawn_point_pink"); break;
+ default: self.cnt = particleeffectnum("spawn_point_neutral"); break;
+ }
+ self.draw = Spawn_Draw;
}
-
- //self.colormod = '200 0 0'; //colormapPaletteColor(teamnum - 1, FALSE);
-
- //setsize(self, PL_MIN, PL_MAX);
-
- //droptofloor();
-
- //self.mdl = "models/domination/dom_unclaimed.md3";
- //precache_model(self.mdl);
- //setmodel(self, self.mdl);
- self.drawmask = MASK_NORMAL;
- self.movetype = MOVETYPE_NOCLIP;
- self.draw = Spawn_Draw;
-
+ /*if(autocvar_cl_spawn_point_model) // needs a model first
+ {
+ self.mdl = "models/spawnpoint.md3";
+ self.colormod = Team_ColorRGB(teamnum);
+ precache_model(self.mdl);
+ setmodel(self, self.mdl);
+ self.drawmask = MASK_NORMAL;
+ //self.movetype = MOVETYPE_NOCLIP;
+ //self.draw = Spawn_Draw;
+ }*/
}
- print(sprintf("Ent_ReadSpawnPoint(is_new = %d); origin = %s, team = %d (%s)\n", is_new, vtos(self.origin), teamnum, "foobar"));
+ print(sprintf("Ent_ReadSpawnPoint(is_new = %d); origin = %s, team = %d, effect = %d\n", is_new, vtos(self.origin), teamnum, self.cnt));
}
void Ent_ReadSpawnEvent(float is_new)
if(is_new)
{
float teamnum = GetPlayerColor(entnum - 1);
- //if(autocvar_cl_spawn_event_sound)
+
+ if(autocvar_cl_spawn_event_sound)
{
sound(self, CH_TRIGGER, "misc/spawn.wav", VOL_BASE, ATTN_NORM);
}
- //if(autocvar_cl_spawn_event_particles)
+ if(autocvar_cl_spawn_event_particles)
{
switch(teamnum)
{
- default: pointparticles(particleeffectnum("red_cap"), self.origin, '0 0 0', 1); break;
+ case NUM_TEAM_1: pointparticles(particleeffectnum("spawn_event_red"), self.origin, '0 0 0', 1); break;
+ case NUM_TEAM_2: pointparticles(particleeffectnum("spawn_event_blue"), self.origin, '0 0 0', 1); break;
+ case NUM_TEAM_3: pointparticles(particleeffectnum("spawn_event_yellow"), self.origin, '0 0 0', 1); break;
+ case NUM_TEAM_4: pointparticles(particleeffectnum("spawn_event_pink"), self.origin, '0 0 0', 1); break;
+ default: pointparticles(particleeffectnum("spawn_event_neutral"), self.origin, '0 0 0', 1); break;
}
}
}
}
}
- print(sprintf("Ent_ReadSpawnEvent(is_new = %d); origin = %s, entnum = %d (%s), localentnum = %d\n", is_new, vtos(self.origin), entnum, player_localentnum, "foobar"));
+ print(sprintf("Ent_ReadSpawnEvent(is_new = %d); origin = %s, entnum = %d, localentnum = %d\n", is_new, vtos(self.origin), entnum, player_localentnum));
}
// CSQC_Ent_Update : Called every frame that the server has indicated an update to the SSQC / CSQC entity has occured.