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 |
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.
|
|
|