/dports/games/redeclipse/base-2.0.0/src/game/ |
H A D | weapons.cpp | 99 d->weapammo[oldweap][W_A_CLIP] = max(d->weapammo[oldweap][W_A_CLIP]-offset, 0); in weapselect() 100 …if(W(oldweap, ammostore) > 0) d->weapammo[oldweap][W_A_STORE] = clamp(d->weapammo[oldweap][W_A_STO… in weapselect() 120 int oldammo = max(d->weapammo[weap][W_A_CLIP], 0), ammoadd = W(weap, ammoadd); in weapreload() 123 store = d->weapammo[weap][W_A_STORE]; in weapreload() 132 d->weapammo[weap][W_A_CLIP] = min(ammo, W(weap, ammoclip)); in weapreload() 185 … d->weapammo[d->weapselect][W_A_CLIP] = max(d->weapammo[d->weapselect][W_A_CLIP]-offset, 0); in weapdrop() 186 …if(W(d->weapselect, ammostore) > 0) d->weapammo[d->weapselect][W_A_STORE] = clamp(d->weapammo[d->w… in weapdrop() 295 …if(sub > 1 && d->weapammo[weap][W_A_CLIP] < sub) maxscale = d->weapammo[weap][W_A_CLIP]/float(sub); in doshot() 301 int curammo = d->weapammo[weap][W_A_CLIP]-offset; in doshot() 306 d->weapammo[weap][W_A_CLIP] = max(curammo, 0); in doshot() [all …]
|
H A D | game.h | 680 if(!isweap(weap) || weapammo[weap][W_A_CLIP] < 0) return -1; 681 int a = weapammo[weap][W_A_CLIP] > 0 ? weapammo[weap][W_A_CLIP] : 0; 684 if(store) a += weapammo[weap][W_A_STORE]; 785 weapammo[i][W_A_CLIP] = weapent[i] = -1; in loopi() 786 weapammo[i][W_A_STORE] = 0; in loopi() 903 … int prevclip = max(weapammo[attr][W_A_CLIP], 0), prevstore = max(weapammo[attr][W_A_STORE], 0); in useitem() 907 …weapammo[attr][W_A_STORE] = W(attr, ammostore) > 0 ? clamp(weapammo[attr][W_A_STORE]+store, 0, W(a… in useitem() 1003 weapammo[s][W_A_CLIP] = W(s, ammospawn); in spawnstate() 1052 loopj(W_MAX) if(weapammo[j][W_A_CLIP] > W(j, ammoclip)) in spawnstate() 1054 …if(W(j, ammostore) > 0) weapammo[j][W_A_STORE] = clamp(weapammo[j][W_A_CLIP]-W(j, ammoclip), 0, W(… in spawnstate() [all …]
|
H A D | server.cpp | 760 ci->weapammo[weap][W_A_CLIP] = max(ci->weapammo[weap][W_A_CLIP]-amt, 0); in takeammo() 786 ci->weapammo[weap][W_A_STORE] = 0; in dropweapon() 4799 if(ci->weapammo[weap][W_A_CLIP] < sub) in process() 4810 …if(sub && W(weap, ammoclip)) ci->weapammo[weap][W_A_CLIP] = max(ci->weapammo[weap][W_A_CLIP]-sub, … in process() 4839 ci->weapammo[weap][W_A_CLIP] = -1; in process() 4840 ci->weapammo[weap][W_A_STORE] = 0; in process() 4888 …if(sub > 1 && ci->weapammo[weap][W_A_CLIP] < sub) maxscale = ci->weapammo[weap][W_A_CLIP]/float(su… in process() 4921 ci->weapammo[weap][W_A_CLIP] = -1; in process() 4922 ci->weapammo[weap][W_A_STORE] = 0; in process() 5003 ci->weapammo[weap][W_A_CLIP] = -1; in process() [all …]
|
H A D | entities.cpp | 486 d->weapammo[weap][W_A_CLIP] = -1; in useeffects() 487 d->weapammo[weap][W_A_STORE] = 0; in useeffects() 732 … f->weapammo[f->weapselect][W_A_CLIP] = max(f->weapammo[f->weapselect][W_A_CLIP]-offset, 0); in execitem() 734 …f->weapammo[f->weapselect][W_A_STORE] = clamp(f->weapammo[f->weapselect][W_A_STORE]+offset, 0, W(f… in execitem()
|
H A D | client.cpp | 960 …CLCOMMANDM(weapammo, "sii", (char *who, int *n, int *m), intret(isweap(*n) ? d->weapammo[*n][clamp… 961 …CLCOMMANDM(weapclip, "si", (char *who, int *n), intret(isweap(*n) ? d->weapammo[*n][W_A_CLIP] : -1… 962 …CLCOMMANDM(weapstore, "si", (char *who, int *n), intret(isweap(*n) ? d->weapammo[*n][W_A_STORE] : … 2256 loopi(W_MAX) loopj(W_A_MAX) d->weapammo[i][j] = getint(p); in parsestate() 2932 …if(sub > 1 && m->weapammo[weap][W_A_CLIP] < sub) maxscale = m->weapammo[weap][W_A_CLIP]/float(sub); in parsemessages()
|
H A D | game.cpp | 1212 …prevstate == W_S_RELOAD && playreloadnotify&(d == focus ? 1 : 2) && (d->weapammo[d->weapselect][W_… in checkoften() 3288 … int ammo = d->weapammo[d->weapselect][W_A_CLIP], maxammo = max(W(d->weapselect, ammoclip), 1); in getplayermaterials() 3936 loopi(W_MAX) previewent->weapammo[i][W_A_CLIP] = W(i, ammoclip); in initplayerpreview() 3937 loopi(W_MAX) previewent->weapammo[i][W_A_STORE] = W(i, ammostore) > 0 ? W(i, ammostore) : 0; in initplayerpreview() 3966 …PLAYERPREV(weapammo, "iii", (int *n, int *o, int *p), previewent->weapammo[clamp(*n, 0, W_ALL-1)][… 3967 …PLAYERPREV(weapclip, "ii", (int *n, int *o), previewent->weapammo[clamp(*n, 0, W_ALL-1)][W_A_CLIP]… 3968 …PLAYERPREV(weapstore, "ii", (int *n, int *o), previewent->weapammo[clamp(*n, 0, W_ALL-1)][W_A_STOR…
|
H A D | projs.cpp | 1179 d->weapammo[weap][W_A_CLIP] = -1; in drop() 1180 d->weapammo[weap][W_A_STORE] = 0; in drop() 1276 d->weapammo[weap][W_A_CLIP] = max(d->weapammo[weap][W_A_CLIP]-sub-offset, 0); in shootv() 1280 …if(W(weap, ammostore) > 0) d->weapammo[weap][W_A_STORE] = clamp(d->weapammo[weap][W_A_STORE]+offse… in shootv()
|
H A D | hud.cpp | 887 int ammo = game::focus->weapammo[weap][W_A_CLIP], maxammo = W(weap, ammoclip), in drawclip() 888 …actortype >= A_ENEMY || W(weap, ammostore) < 0 ? maxammo : game::focus->weapammo[weap][W_A_STORE],… in drawclip() 1024 val = game::focus->weapammo[weap][W_A_CLIP]/float(W(weap, ammoclip)); in drawcirclebar()
|
H A D | ai.cpp | 1413 …bool timepassed = d->weapstate[d->weapselect] == W_S_IDLE && (d->weapammo[d->weapselect][W_A_CLIP]… in request() 1414 …if(!firing && (!occupied || d->weapammo[d->weapselect][W_A_CLIP] <= 0) && timepassed && d->hasweap… in request()
|