Crossfire Server, Trunk
reputation.py
Go to the documentation of this file.
1 import Crossfire
2 import CFReputation
3 
4 def get_killer(hitter):
5  owner = hitter.Owner
6  if owner is not None:
7  return owner
8  return hitter
9 
10 def is_player(op):
11  return op.Type == Crossfire.Type.PLAYER
12 
13 killer = get_killer(Crossfire.WhoIsActivator())
14 victim = Crossfire.WhoAmI()
15 
16 if is_player(killer):
17  CFReputation.record_kill(victim.Race, victim.Map.Region.Name, killer.Name)
CFReputation.record_kill
def record_kill(race, region, player, fraction=0.0001, limit=0.4)
Definition: __init__.py:65
reputation.get_killer
def get_killer(hitter)
Definition: reputation.py:4
reputation.is_player
def is_player(op)
Definition: reputation.py:10