mirror of
https://github.com/nzp-team/quakec.git
synced 2024-11-26 05:41:20 +00:00
SERVER: Fix lightning colors for Traps and Wunderwaffe
This commit is contained in:
parent
2672e94387
commit
fce7de38d6
3 changed files with 52 additions and 18 deletions
|
@ -130,12 +130,12 @@ void zapper_play () {
|
||||||
|
|
||||||
#ifdef FTE
|
#ifdef FTE
|
||||||
|
|
||||||
te_lightning2(self, self.origin, zents.origin);
|
te_lightning1(self, self.origin, zents.origin);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY);
|
||||||
WriteByte (MSG_BROADCAST, TE_LIGHTNING2);
|
WriteByte (MSG_BROADCAST, TE_LIGHTNING1);
|
||||||
WriteEntity (MSG_BROADCAST, self);
|
WriteEntity (MSG_BROADCAST, self);
|
||||||
WriteCoord (MSG_BROADCAST, org_x);
|
WriteCoord (MSG_BROADCAST, org_x);
|
||||||
WriteCoord (MSG_BROADCAST, org_y);
|
WriteCoord (MSG_BROADCAST, org_y);
|
||||||
|
|
|
@ -193,8 +193,11 @@ void() tesla_arc = {
|
||||||
vector target_pos = best_ent.origin + tesla_arc_ofs_for_ent(best_ent);
|
vector target_pos = best_ent.origin + tesla_arc_ofs_for_ent(best_ent);
|
||||||
|
|
||||||
#ifdef FTE
|
#ifdef FTE
|
||||||
|
|
||||||
te_lightning1(self, source_pos, target_pos);
|
te_lightning1(self, source_pos, target_pos);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
|
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
|
||||||
WriteByte(MSG_BROADCAST, TE_LIGHTNING1);
|
WriteByte(MSG_BROADCAST, TE_LIGHTNING1);
|
||||||
WriteEntity(MSG_BROADCAST, self);
|
WriteEntity(MSG_BROADCAST, self);
|
||||||
|
@ -204,7 +207,9 @@ void() tesla_arc = {
|
||||||
WriteCoord(MSG_BROADCAST, target_pos.x);
|
WriteCoord(MSG_BROADCAST, target_pos.x);
|
||||||
WriteCoord(MSG_BROADCAST, target_pos.y);
|
WriteCoord(MSG_BROADCAST, target_pos.y);
|
||||||
WriteCoord(MSG_BROADCAST, target_pos.z);
|
WriteCoord(MSG_BROADCAST, target_pos.z);
|
||||||
|
|
||||||
#endif // FTE
|
#endif // FTE
|
||||||
|
|
||||||
}
|
}
|
||||||
// No ent to arc to, tell arc parent to resume its search
|
// No ent to arc to, tell arc parent to resume its search
|
||||||
// else if(self.tesla_arc_parent != world) {
|
// else if(self.tesla_arc_parent != world) {
|
||||||
|
@ -222,12 +227,12 @@ void() W_FireTesla =
|
||||||
{
|
{
|
||||||
vector source;
|
vector source;
|
||||||
|
|
||||||
source = self.origin + self.view_ofs;
|
|
||||||
makevectors(self.v_angle);
|
makevectors(self.v_angle);
|
||||||
vector barrel_ofs = '5.560 -3 30';
|
source = self.origin + self.view_ofs;
|
||||||
source += v_right * barrel_ofs.x;
|
vector barrel_ofs = GetWeaponFlash_Offset(self.weapon);
|
||||||
source += v_up * barrel_ofs.y;
|
source += v_right * (barrel_ofs.x/1000);
|
||||||
source += v_forward * barrel_ofs.z;
|
source += v_up * (barrel_ofs.y/1000);
|
||||||
|
source += v_forward * (barrel_ofs.z/1000);
|
||||||
|
|
||||||
|
|
||||||
#ifdef FTE
|
#ifdef FTE
|
||||||
|
@ -240,10 +245,15 @@ void() W_FireTesla =
|
||||||
self.dimension_hit = HITBOX_DIM_ZOMBIES;
|
self.dimension_hit = HITBOX_DIM_ZOMBIES;
|
||||||
#endif // FTE
|
#endif // FTE
|
||||||
|
|
||||||
|
// Initial Lightning is Red when Pack-A-Punched
|
||||||
|
if (IsPapWeapon(self.weapon)) {
|
||||||
|
|
||||||
#ifdef FTE
|
#ifdef FTE
|
||||||
te_lightning1(world, source, trace_endpos);
|
|
||||||
|
te_lightning2(world, source, trace_endpos);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
|
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
|
||||||
WriteByte(MSG_BROADCAST, TE_LIGHTNING2);
|
WriteByte(MSG_BROADCAST, TE_LIGHTNING2);
|
||||||
WriteEntity(MSG_BROADCAST, self);
|
WriteEntity(MSG_BROADCAST, self);
|
||||||
|
@ -253,8 +263,31 @@ void() W_FireTesla =
|
||||||
WriteCoord(MSG_BROADCAST, trace_endpos_x);
|
WriteCoord(MSG_BROADCAST, trace_endpos_x);
|
||||||
WriteCoord(MSG_BROADCAST, trace_endpos_y);
|
WriteCoord(MSG_BROADCAST, trace_endpos_y);
|
||||||
WriteCoord(MSG_BROADCAST, trace_endpos_z);
|
WriteCoord(MSG_BROADCAST, trace_endpos_z);
|
||||||
|
|
||||||
#endif // FTE
|
#endif // FTE
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
#ifdef FTE
|
||||||
|
|
||||||
|
te_lightning1(world, source, trace_endpos);
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
WriteByte(MSG_BROADCAST, SVC_TEMPENTITY);
|
||||||
|
WriteByte(MSG_BROADCAST, TE_LIGHTNING1);
|
||||||
|
WriteEntity(MSG_BROADCAST, self);
|
||||||
|
WriteCoord(MSG_BROADCAST, source_x);
|
||||||
|
WriteCoord(MSG_BROADCAST, source_y);
|
||||||
|
WriteCoord(MSG_BROADCAST, source_z);
|
||||||
|
WriteCoord(MSG_BROADCAST, trace_endpos_x);
|
||||||
|
WriteCoord(MSG_BROADCAST, trace_endpos_y);
|
||||||
|
WriteCoord(MSG_BROADCAST, trace_endpos_z);
|
||||||
|
|
||||||
|
#endif // FTE
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
self.tesla_n_kills = 0;
|
self.tesla_n_kills = 0;
|
||||||
|
|
||||||
entity hit_ent = trace_ent;
|
entity hit_ent = trace_ent;
|
||||||
|
|
|
@ -3700,6 +3700,7 @@ void(float weptype) precache_extra =
|
||||||
precache_sound("sounds/weapons/tesla/clipoff.wav");
|
precache_sound("sounds/weapons/tesla/clipoff.wav");
|
||||||
precache_sound("sounds/weapons/tesla/switchon.wav");
|
precache_sound("sounds/weapons/tesla/switchon.wav");
|
||||||
precache_sound("sounds/weapons/tesla/shoot.wav");
|
precache_sound("sounds/weapons/tesla/shoot.wav");
|
||||||
|
precache_sound("sounds/machines/elec_shock.wav");
|
||||||
break;
|
break;
|
||||||
case W_BK:
|
case W_BK:
|
||||||
case W_KRAUS:
|
case W_KRAUS:
|
||||||
|
|
Loading…
Reference in a new issue