Its a dup of Restore_Building with extra bits. I only use the function Revive_Building. We still want to set the building health. Turn the base power back on if it is a power plant. We want to apply damage to the building to force it to update. If you don't it will still look damaged until a player damage's the building.
Idk if their is a difference but Im still using 4.3 RC2 or what ever Revision 7103 is
// Restore building health
float max = Commands->Get_Max_Health(building);
Commands->Set_Health(building, max);
// Still do this to wake everything up.
// This is needed to update the state of a building from 'dead' to 'alive on the client
Commands->Apply_Damage(building, 1.0f, "Explosive", 0);
// If we're a Power Plant turn on base power
if (building->As_BuildingGameObj()->As_PowerPlantGameObj()) Power_Base(Team, true);
You want to do these 3 things still in addition to the scripts Restore_Building
[Updated on: Tue, 21 February 2017 23:38]
Report message to a moderator