Marco you are right, I have looked into this method and I know which variable is None. Maybe I am able to fix it by giving the player a VereranSkillLevel in CheckReplacement.
BEEEEEES I can see on your screenshot Berserker 6. How did you do that? I can only be nothing.
EDIT: Okay prices are correct with this code: (I removed the 6 Log lines)
Code:
if (KFPlayerReplicationInfo(Other) != None)
{
if (KFPlayerReplicationInfo(Other).ClientVeteranSkill == None)
{
KFPlayerReplicationInfo(Other).ClientVeteranSkill = Class'KFVeterancyTypes';
}
return true;
}
But things I buy aren't put into the inventory... time to track down that bug...
EDIT: It works! I had to replace weapons too, not only the Pickups. Do not ask my why... Maybe I find the reason in the log file.
EDIT: STRANGE... really strange, since I worked on the mutator I suffer the "Can not connect bug" described here:
http://forums.tripwireinteractive.com/showthread.php?t=38803 That really sucks!
EDIT: Okay some bugs
* There are always two pickups on the same place (random weapon pickups on maps)
* Looks like the pickups are never destroyed
* Sometimes buying does not work? (that will be a long night; hello dear replication)
* Players can sell my 9mm replacement. (Urgh)
I think this is very suboptimal:
Code:
// I need this to replace Pickups that are on the ground
// and to make buying modified weapons working (why??).
for (i = 0; i < MAX_REPLACE; ++i)
{
if (Other.Class == From[i])
{
Log("XXXX: Replacing [[" $ String(Other) $
"]] which matched [[" $ String(From[i]) $
"]] with [[" $ String(To[i]) $ "]]");
ReplaceWith(Other, String(To[i]));
return false;
}
}