Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] NoC4DefuseOnLeave
Re: [SSGM 4.0 Plugin] NoC4DefuseOnLeave [message #491985 is a reply to message #467862] Sat, 11 February 2017 00:57 Go to previous messageGo to previous message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma:
Commander
I removed the cloned c4gameobj stuff and redid it without the asm code as well. To use this though you are gonna need to modify dac4beacon.cpp a tiny bit or it will crash when a proximity mine detonates. This occurs on both the asm and the redone version. Its because references a null pointer. Just replace this one function with this tweaked one that uses Get_Player_Name(get_owner()) to get the name of the player instead of playerdata. This needs to be fixed in a few different spots.

void DAC4BeaconManager::C4_Detonate_Event(C4GameObj *C4) {
	if (C4->Get_Owner()) {
		DALogManager::Write_Log("_C4","%ls %s has detonated (Attached to: %s)",Make_Possessive((StringClass)Get_Player_Name(C4->Get_Owner())),DATranslationManager::Translate(C4),C4->Get_Stuck_Object()?DATranslationManager::Translate(C4->Get_Stuck_Object()):"None");
	}
}


I also attached the fixed da_c4beacon.cpp. It fixes all the issues regarding beacons and c4 with no playerdata.

[Updated on: Sat, 11 February 2017 18:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [CODE]Server frame time checker (Thanks to jonwil!)
Next Topic: [SSGM Plugin] EvacPlugin
Goto Forum:
  


Current Time: Thu May 23 05:40:05 MST 2024

Total time taken to generate the page: 0.23832 seconds