Does anyone know the intricacies of W_FireLightning()? Especially pertaining to changing the start position of the lightning entity.
No amount of changing org has changed the start position, so I'm presuming that the internal code uses the origin of the sent entity:
I'm considering creating a temporary entity to act as the start position, but will the engine know that its the owner of the entity that is the player? (For death messages etc).
No amount of changing org has changed the start position, so I'm presuming that the internal code uses the origin of the sent entity:
Code:
WriteByte (MSG_BROADCAST, SVC_TEMPENTITY); WriteByte (MSG_BROADCAST, TE_LIGHTNING2); WriteEntity (MSG_BROADCAST, self); // <--- start pos for lightning? WriteCoord (MSG_BROADCAST, org_x); WriteCoord (MSG_BROADCAST, org_y); WriteCoord (MSG_BROADCAST, org_z); WriteCoord (MSG_BROADCAST, trace_endpos_x); WriteCoord (MSG_BROADCAST, trace_endpos_y); WriteCoord (MSG_BROADCAST, trace_endpos_z); LightningDamage (self.origin, trace_endpos + v_forward*4, self, 30);
Comment