Exemple #1
0
def issueDamageUpdate():
    for cn in acserver.getClients():
        cl = acserver.getClient(cn)
        if cl == None:
            continue
            
        if cl['state'] == CS_ALIVE:
            acserver.damageClient(cn,cn,max(2,int(cl['health']*healthmod)))
        
        acserver.setClient(cn,points=cl['health'])
Exemple #2
0
def servertick(gm,sm):
    global frames, waterlevel
    frames += 1
    if not enabled:
        return
        
    if frames%10 == 0:
        clients = acserver.getClients()
        if not clients:
            return
        
        for cn in clients:
            cl = acserver.getClient(cn)
            if cl == None:
                continue
                
            z = cl['pos'][2]
            if z < waterlevel and z > -256 and z < 256 and cl['state'] == 0:
                acserver.damageClient(cn,cn,1)