Files
assaultcube-/config/compatibility.cfg
T
ac-stef eb60302e67 cleanup
- fix possible crash in conc (but it's still an ugly hack)
- fix noob usage of strcmp
- flag some memory leaks (it would be nice, if the author(s) would clean
   up the mess himself)
- fix crash in substr
- whitespace cleanup

there are plenty more memory leaks in command.cpp - for example, every
goto in cubescript does not clean up anything
2014-05-14 22:54:37 +02:00

42 lines
1.4 KiB
INI

// Makes old cubescripts compatible with newer versions of the game
persistidents 0
const alive [ if (&& $numargs (isclient $arg1)) [ result (player $arg1 alive) ] [ result (player1 alive) ] ]
const currole [ if (&& $numargs (isclient $arg1)) [ result (player $arg1 role) ] [ result (player1 role) ] ]
const curmode [ result $gamemode ]
const getclientmode [ result $gamemode ]
const curteam [ if (&& $numargs (isclient $arg1)) [ result (player $arg1 team) ] [ result (player1 team) ] ]
const findpn [ if (isclient $arg1) [ result (player $arg1 name) ] [ result [] ] ]
const isSpect [ if (&& $numargs (isclient $arg1)) [ result (player $arg1 spect) ] [ result (player1 spect) ] ]
const pstat_score [
if (isclient $arg1) [
result (concat (player $arg1 flags) (player $arg1 frags) (player $arg1 deaths) (player $arg1 points) (player $arg1 team) (player $arg1 tks) (player $arg1 name))
] [ result (concat [0 0 0 0 -1 0] (addpunct)) ]
]
const orderscorecolumns [
if (= $arg1 1) [
sc_clientnum 0;
sc_name 1;
sc_flags 2;
sc_frags 3;
sc_deaths 4;
sc_score 5;
sc_lag 6;
sc_ratio -1;
] [
sc_flags 0;
sc_frags 1;
sc_deaths 2;
sc_ratio -1;
sc_score 4;
sc_lag 5;
sc_clientnum 6;
sc_name 7;
]
]
persistidents 1