mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-25 21:31:28 +00:00
CLIENT: Add support for Gib Event
This commit is contained in:
parent
3de18c324c
commit
fd6cb138a2
4 changed files with 42 additions and 25 deletions
|
@ -1245,7 +1245,7 @@ noref void() CSQC_Parse_Event =
|
|||
pointparticles(particleeffectnum("weapons.explode"), org, '0 0 0', 1);
|
||||
break;
|
||||
case EVENT_BLOOD:
|
||||
local vector loc;
|
||||
vector loc;
|
||||
|
||||
loc_x = readcoord();
|
||||
loc_y = readcoord();
|
||||
|
@ -1254,6 +1254,18 @@ noref void() CSQC_Parse_Event =
|
|||
if (cvar("nzp_particles"))
|
||||
pointparticles(particleeffectnum("blood.blood_particle"), loc, '0 0 0', 1);
|
||||
break;
|
||||
case EVENT_LIMBGIB:
|
||||
vector gloc;
|
||||
|
||||
gloc_x = readcoord();
|
||||
gloc_y = readcoord();
|
||||
gloc_z = readcoord();
|
||||
|
||||
if (cvar("nzp_particles")) {
|
||||
pointparticles(particleeffectnum("blood.blood_particle"), gloc, '0 0 0', 1);
|
||||
pointparticles(particleeffectnum("blood.gibs"), gloc, '0 0 0', 1);
|
||||
}
|
||||
break;
|
||||
case EVENT_WEAPONCHANGE:
|
||||
local float to;
|
||||
to = readbyte();
|
||||
|
|
|
@ -827,24 +827,26 @@ void() AI_SetAllEnemiesBBOX =
|
|||
entity zombies = find(world, classname, "ai_zombie");
|
||||
|
||||
while(zombies != world) {
|
||||
zombies.last_solid = zombies.solid;
|
||||
zombies.solid = SOLID_BBOX;
|
||||
if (zombies.aistatus == "1") {
|
||||
zombies.last_solid = zombies.solid;
|
||||
zombies.solid = SOLID_BBOX;
|
||||
|
||||
if (zombies.head) {
|
||||
zombies.head.last_solid = zombies.head.solid;
|
||||
zombies.head.solid = SOLID_BBOX;
|
||||
if (zombies.head) {
|
||||
zombies.head.last_solid = zombies.head.solid;
|
||||
zombies.head.solid = SOLID_BBOX;
|
||||
}
|
||||
|
||||
if (zombies.larm) {
|
||||
zombies.larm.last_solid = zombies.larm.solid;
|
||||
zombies.larm.solid = SOLID_BBOX;
|
||||
}
|
||||
|
||||
if (zombies.rarm) {
|
||||
zombies.rarm.last_solid = zombies.rarm.solid;
|
||||
zombies.rarm.solid = SOLID_BBOX;
|
||||
}
|
||||
}
|
||||
|
||||
if (zombies.larm) {
|
||||
zombies.larm.last_solid = zombies.larm.solid;
|
||||
zombies.larm.solid = SOLID_BBOX;
|
||||
}
|
||||
|
||||
if (zombies.rarm) {
|
||||
zombies.rarm.last_solid = zombies.rarm.solid;
|
||||
zombies.rarm.solid = SOLID_BBOX;
|
||||
}
|
||||
|
||||
|
||||
zombies = find(zombies, classname, "ai_zombie");
|
||||
}
|
||||
}
|
||||
|
@ -854,14 +856,16 @@ void() AI_RevertEnemySolidState =
|
|||
entity zombies = find(world, classname, "ai_zombie");
|
||||
|
||||
while(zombies != world) {
|
||||
zombies.solid = zombies.last_solid;
|
||||
if (zombies.aistatus == "1") {
|
||||
zombies.solid = zombies.last_solid;
|
||||
|
||||
if (zombies.head)
|
||||
zombies.head.solid = zombies.head.last_solid;
|
||||
if (zombies.larm)
|
||||
zombies.larm.solid = zombies.larm.last_solid;
|
||||
if (zombies.rarm)
|
||||
zombies.rarm.solid = zombies.rarm.last_solid;
|
||||
if (zombies.head)
|
||||
zombies.head.solid = zombies.head.last_solid;
|
||||
if (zombies.larm)
|
||||
zombies.larm.solid = zombies.larm.last_solid;
|
||||
if (zombies.rarm)
|
||||
zombies.rarm.solid = zombies.rarm.last_solid;
|
||||
}
|
||||
|
||||
zombies = find(zombies, classname, "ai_zombie");
|
||||
}
|
||||
|
|
|
@ -590,7 +590,7 @@ void(vector where) spawn_gibs = {
|
|||
#else
|
||||
|
||||
WriteByte(MSG_MULTICAST, SVC_CGAMEPACKET);
|
||||
WriteByte(MSG_MULTICAST, EVENT_BLOOD);
|
||||
WriteByte(MSG_MULTICAST, EVENT_LIMBGIB);
|
||||
WriteCoord(MSG_MULTICAST, where_x);
|
||||
WriteCoord(MSG_MULTICAST, where_y);
|
||||
WriteCoord(MSG_MULTICAST, where_z);
|
||||
|
|
|
@ -57,6 +57,7 @@ const float EVENT_WEAPONRECOIL = 40;
|
|||
const float EVENT_SONGPLAY = 41;
|
||||
const float EVENT_GRENADEPULSE = 42;
|
||||
const float EVENT_BETTYPROMPT = 43;
|
||||
const float EVENT_LIMBGIB = 44;
|
||||
|
||||
// Define our FTE platform
|
||||
#ifndef STANDARD
|
||||
|
|
Loading…
Reference in a new issue