I'm trying to replace all magnums with melee weapons in L4D2. Tried this:
PHP Code:
modify:
{
match:
{
"classname" "/weapon_pistol_magnum_spawn/"
}
replace:
{
"classname" "weapon_melee_spawn"
}
After comparing dump files tried to completely change magnum spawn entity:
PHP Code:
"origin" "5295 8394 5576"
"targetname" "spawnitems_guns"
"spawnflags" "2"
"solid" "6"
"skin" "0"
"model" "models/w_models/weapons/w_pistol_1911.mdl"
"count" "1"
"angles" "0 300 -87"
"classname" "weapon_pistol_magnum_spawn"
"hammerid" "4296921"
to melee spawn entity:
PHP Code:
"origin" "6112.63 8262.97 5922.27"
"targetname" "weapons_scavenge"
"spawnflags" "3"
"solid" "6"
"skin" "0"
"melee_weapon" "crowbar"
"disableshadows" "1"
"count" "1"
"angles" "0 150 -90"
"classname" "weapon_melee_spawn"
"hammerid" "4331696"
Result:
PHP Code:
modify:
{
match:
{
"classname" "/weapon_pistol_magnum_spawn/"
}
replace:
{
"targetname" "weapons_scavenge"
"spawnflags" "3"
"classname" "weapon_melee_spawn"
}
insert:
{
"melee_weapon" "golfclub,fireaxe,frying_pan,machete,baseball_bat,crowbar,cricket_bat,electric_guitar,katana,tonfa" //All melees are unlocked with Left 4 Downtown 2, so it works in other cases.
"disableshadows" "1"
}
delete:
{
"model" "models/w_models/weapons/w_pistol_1911.mdl"
}
}
It's not working, magnum spawns just disappear. Any ideas what I'm doing wrong?