roszek wrote on Sun, 09 November 2014 18:22 |
Fixed, Thanks.
|
You need to fix when it counts vehicle shells, guard towers and turrets as a vehicle.
From my 4.0 source code.
void VkillsCommand::OnObjectCreate(void *data,GameObject *obj)
{
if (obj->As_VehicleGameObj())
{
Attach_Script_Once(obj,"Vkills_Vehicle","");
}
}
void Vkills_Vehicle::Killed(GameObject *obj,GameObject *killer)
{
if (Commands->Is_A_Star(killer))
{
if (strstr(Commands->Get_Preset_Name(obj),"_Destroyed") || strstr(Commands->Get_Preset_Name(obj),"_destroyed") || (Get_Vehicle_Mode(obj) == VEHICLE_TYPE_TURRET))
{
((SoldierGameObj*)killer)->Get_Player_Data()->VehiclesDestroyed--;
}
}
}
ScriptRegistrant<Vkills_Vehicle> Vkills_Vehicle_Registrant("Vkills_Vehicle","");