Renegade Public Forums
C&C: Renegade --> Dying since 2003™, resurrected in 2024!
Home » Renegade Discussions » Mod Release Forum » [SSGM 4.0 Plugin] Building Revival Console Commands v2.0
Re: [SSGM 4.0 Plugin] Building Revival Console Commands v2.0 [message #492037 is a reply to message #492034] Wed, 22 February 2017 13:40 Go to previous messageGo to previous message
dblaney1 is currently offline  dblaney1
Messages: 358
Registered: March 2014
Location: United States
Karma:
Commander
Gen_Blacky wrote on Wed, 22 February 2017 12:11

Ah yea mine it out of date. Still doing it the old way Instead of calling On_Revived.

void SCRIPTS_API Restore_Building(GameObject* obj) 
{
	if (!obj) return;
	
	BuildingGameObj* building = obj->As_BuildingGameObj();
	if (!building || !building->Is_Destroyed())
		return;

	building->Set_Is_Destroyed(false);

	BaseControllerClass* base = BaseControllerClass::Find_Base(Get_Object_Type(building));
	if (base) 
	{
		if (building->As_SoldierFactoryGameObj())
			base->Set_Can_Generate_Soldiers(true);
		
		if (building->As_VehicleFactoryGameObj())
			base->Set_Can_Generate_Vehicles(true);
		
		base->Set_Object_Dirty_Bit(NetworkObjectClass::BIT_RARE, true);
	}
}



Post an updated one when you get a chance please. With the restore building fix and playing the sounds on the dialog channel.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: MapFix Plugin
Next Topic: RenList 1.0.9
Goto Forum:
  


Current Time: Sat Dec 28 03:15:55 MST 2024

Total time taken to generate the page: 0.00892 seconds