ammo share fix?

This commit is contained in:
viktorljung
2016-03-13 20:32:08 +01:00
parent 6bfed76e06
commit 1da3ec3c74
5 changed files with 20 additions and 18 deletions
+4 -3
View File
@@ -8,9 +8,7 @@ BoostSystem::BoostSystem(SystemParams params)
bool BoostSystem::OnPlayerDamage(Events::PlayerDamage& e)
{
if (!IsServer) {
return false;
}
if (e.Victim == e.Inflictor) {
return false;
@@ -35,6 +33,9 @@ bool BoostSystem::OnPlayerDamage(Events::PlayerDamage& e)
if (className == "SidearmWeapon") { // give ammo
giveAmmo(e.Inflictor, e.Victim);
} else { //give boost
if (!IsServer) {
return false;
}
//get the XML file, example: "Schema/Entities/BoostclassName.xml"
std::string classXML = "Schema/Entities/" + className + ".xml";