shithub: choc

Download patch

ref: 12732a1501d7690ba011270b4473dc8556ddf5e8
parent: d95cbcfa2bd3479dfdbfad536d888ac828727a68
author: James Haley <[email protected]>
date: Wed Sep 17 21:22:41 EDT 2014

Upstream bug fix to teleport beacon allegiance

Was not propagating properly from player to beacon to rebels due to
mistranslated assembly code; access to wrong structure.

--- a/src/strife/p_user.c
+++ b/src/strife/p_user.c
@@ -776,7 +776,9 @@
 
 //
 // P_SpawnTeleportBeacon
+//
 // villsa [STRIFE] new function
+// haleyjd 20140918: bug fixed to propagate allegiance properly.
 //
 boolean P_SpawnTeleportBeacon(player_t* player)
 {
@@ -816,7 +818,7 @@
     if(P_CheckPosition(beacon, x, y))
     {
         beacon->target = mo;
-        beacon->miscdata = mo->miscdata;
+        beacon->miscdata = (byte)(player->allegiance);
         beacon->angle = (angle << ANGLETOFINESHIFT);
         beacon->momx = FixedMul(finecosine[angle], (5*FRACUNIT));
         beacon->momy = FixedMul(finesine[angle], (5*FRACUNIT));