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 #492034 is a reply to message #482927] Wed, 22 February 2017 12:11 Go to previous messageGo to previous message
Gen_Blacky is currently offline  Gen_Blacky
Messages: 3250
Registered: September 2006
Karma:
General (3 Stars)
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);
	}
}


http://s18.postimage.org/jc6qbn4k9/bricks3.png
 
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 18:06:28 MST 2024

Total time taken to generate the page: 0.01091 seconds