Merge remote-tracking branch 'upstream/main'

This commit is contained in:
Tyler Young 2023-11-29 22:40:37 -05:00
commit e59403f7c8
13 changed files with 67 additions and 62 deletions

View file

@ -1403,6 +1403,17 @@ noref void() CSQC_Parse_Event =
if (cvar("nzp_particles"))
pointparticles(particleeffectnum("blood.blood_particle"), loc, '0 0 0', 1);
break;
case EVENT_FLAME:
vector floc;
floc_x = readcoord();
floc_y = readcoord();
floc_z = readcoord();
if (cvar("nzp_particles")) {
pointparticles(particleeffectnum("flames.flame_particle"), floc, '0 0 0', 1);
}
break;
case EVENT_LIMBGIB:
vector gloc;

View file

@ -290,7 +290,7 @@ void(entity who) makeCrawler =
#ifndef FTE
updateLimb (who, 0, world);
updateLimb (who, 0, who.head);
#endif // FTE
@ -301,7 +301,7 @@ void(entity who) makeCrawler =
#ifndef FTE
updateLimb (who, 1, world);
updateLimb (who, 1, who.larm);
#endif // FTE
@ -312,7 +312,7 @@ void(entity who) makeCrawler =
#ifndef FTE
updateLimb (who, 2, world);
updateLimb (who, 2, who.rarm);
#endif // FTE

View file

@ -140,7 +140,11 @@ void() Dog_Think =
// Hellhounds begin to run whenever their target is in their line of sight.
// So perform a tracemove and see if it hits it
if (self.ads_release == 0) {
#ifdef FTE
float result = tracemove(self.origin, VEC_HULL_MIN, VEC_HULL_MAX, self.enemy.origin, TRUE, self);
#else
float result = tracemove_fake(self.origin, VEC_HULL_MIN, VEC_HULL_MAX, self.enemy.origin, TRUE, self);
#endif // FTE
self.ads_release = result;
}
@ -153,18 +157,8 @@ void() Dog_Think =
// Play particles if we're on fire
if (self.onfire) {
#ifdef FTE
te_flamejet(self.origin, v_up*8, 10);
#else
particle (self.origin, v_up*8, 0, 0);
#endif // FTE
Effect_Fire(self.origin);
}
}
float dogCount;

View file

@ -647,6 +647,28 @@ void(entity who, float version) nzp_setdoubletapver =
#endif // FTE
void(vector org) Effect_Fire =
{
#ifndef FTE
particle (self.origin, v_up*8, 111, 0);
#else
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
WriteByte(MSG_MULTICAST, EVENT_FLAME);
WriteCoord(MSG_MULTICAST, org_x);
WriteCoord(MSG_MULTICAST, org_y);
WriteCoord(MSG_MULTICAST, org_z);
multicast('0 0 0', MULTICAST_ALL);
//te_flamejet(self.origin, v_up*8, 10);
#endif // FTE
};
// *****************************************
// Unrelated to engine, but custom functions
// *****************************************

View file

@ -155,9 +155,12 @@ void() EndGameSetup =
// if they aren't dead, we keep looping until our OWN death (45 seconds, so 300 loops)
void() rec_downed =
{
self.downedloop++;
if (self.downedloop >= 300) {
if (!self.beingrevived)
self.downedloop += 1;
if (self.downedloop >= 30) {
DisableReviveIcon(self.electro_targeted);
revive_index--;
startspectate();
return;
}
@ -170,7 +173,7 @@ void() rec_downed =
}
self.think = rec_downed;
self.nextthink = time + 0.1;
self.nextthink = time + 1;
}
float() push_away_zombies;

View file

@ -54,17 +54,7 @@ void() Barrel_Think =
{
// Spawn the flame particles
if (self.ltime > 10) {
#ifndef FTE
particle (self.origin, v_up, 111, 0);
#else
te_flamejet(self.origin + '0 0 45', v_up, 10);
#endif // FTE
Effect_Fire(self.origin + '0 0 45');
self.ltime = 0;
}
self.ltime++;

View file

@ -28,33 +28,17 @@
string(float wep, float gorvmodel) GetWeaponModel;
void() ReturnWeaponModel;
void() flame_update = {
#ifndef FTE
particle (self.origin, v_up, 111, 0);
#else
te_flamejet(self.origin, v_up, 10);
#endif // FTE
void() flame_update =
{
Effect_Fire(self.origin);
self.think = flame_update;
self.nextthink = time + random()+0.1;
}
void() place_fire =
{
#ifndef FTE
particle (self.origin, v_up*8, self.frame, 0);
#else
te_flamejet(self.origin, v_up*8, 10);
#endif // FTE
Effect_Fire(self.origin);
self.think = flame_update;
self.nextthink = time + random()+0.1;

View file

@ -410,7 +410,7 @@ void() PlayerPreThink =
}
if(self.isspec != 0 && !self.downed)
{
if(self.button0)
if(self.button0 && self.fire_delay < time)
{
self.aiment = find(self.aiment, classname, "player");
if(self.aiment != world)
@ -427,6 +427,7 @@ void() PlayerPreThink =
sprint(self, PRINT_HIGH, "Freefly spectate\n");
self.movetype = MOVETYPE_FLY;
}
self.fire_delay = time + 0.25;
}
if(self.aiment != world)
{

View file

@ -242,6 +242,8 @@ void() NewRound =
if (world.fog) {
localcmd(strcat("fog ", world.fog));
} else {
localcmd("fog 0 0 0 0 0\n");
}
}

View file

@ -129,6 +129,13 @@ float(string params) Command_noclip =
return COMMAND_FAILURE;
}
if (self.model == "") {
setmodel(self, "models/player.mdl");
setsize(self, VEC_HULL_MIN, VEC_HULL_MAX);
} else {
setmodel(self, "");
}
client_parse_override = false;
return COMMAND_SUCCESS;
}

View file

@ -33,16 +33,7 @@
//
void() Flame_LingerThink =
{
#ifdef FTE
te_flamejet(self.origin, v_up*8, 5);
#else
particle (self.origin, v_up*8, 0, 0);
#endif // FTE
Effect_Fire(self.origin);
if (self.ltime < time)
remove(self);

View file

@ -594,8 +594,7 @@ void(vector where) spawn_gibs = {
WriteCoord(MSG_MULTICAST, where_x);
WriteCoord(MSG_MULTICAST, where_y);
WriteCoord(MSG_MULTICAST, where_z);
msg_entity = self;
multicast('0 0 0', MULTICAST_ONE);
multicast('0 0 0', MULTICAST_ALL);
#endif // FTE

View file

@ -60,6 +60,7 @@ const float EVENT_BETTYPROMPT = 43;
const float EVENT_LIMBGIB = 44;
const float EVENT_CHATMESSAGE = 45;
const float EVENT_DOUBLETAPUPDATE = 46;
const float EVENT_FLAME = 47;
// Define our FTE platform
#ifndef STANDARD