no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@468 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -491,7 +491,7 @@ void selfdamage(int damage, int actor, dynent *act, bool gib)
|
||||
// EDIT: AH
|
||||
if(m_ctf) ctf_death();
|
||||
showscores(true);
|
||||
if(scoped) togglescope();
|
||||
setscope(false);
|
||||
if(act->bIsBot) addmsg(1, 2, SV_DIEDBYBOT, actor);
|
||||
else addmsg(1, 2, gib ? SV_GIBDIED : SV_DIED, actor);
|
||||
player1->lifesequence++;
|
||||
|
||||
@@ -100,7 +100,7 @@ COMMANDN(bind, bindkey, ARG_2STR);
|
||||
void saycommand(char *init) // turns input to the command line on or off
|
||||
{
|
||||
SDL_EnableUNICODE(saycommandon = (init!=NULL));
|
||||
if(scoped) togglescope();
|
||||
setscope(false);
|
||||
if(!editmode) keyrepeat(saycommandon);
|
||||
if(!init) init = "";
|
||||
strcpy_s(commandbuf, init);
|
||||
|
||||
@@ -57,7 +57,7 @@ bool rendermenu()
|
||||
{
|
||||
if(vmenu<0) { menustack.setsize(0); return false; };
|
||||
|
||||
if(scoped) togglescope();
|
||||
setscope(false);
|
||||
|
||||
if(vmenu==1) refreshservers();
|
||||
gmenu &m = menus[vmenu];
|
||||
@@ -217,7 +217,7 @@ bool menukey(int code, bool isdown)
|
||||
|
||||
if(isdown)
|
||||
{
|
||||
if(scoped) togglescope();
|
||||
setscope(false);
|
||||
int oldmenusel = menusel;
|
||||
if(code==SDLK_ESCAPE)
|
||||
{
|
||||
|
||||
+1
-1
@@ -175,7 +175,6 @@ extern void rendershotlines();
|
||||
extern void shotlinereset();
|
||||
extern void renderphysents();
|
||||
extern bool scoped;
|
||||
extern void togglescope(bool deactivate = false);
|
||||
extern void addgib(dynent *d);
|
||||
extern void loadingscreen();
|
||||
|
||||
@@ -262,6 +261,7 @@ extern bool gun_changed;
|
||||
extern bool akimboside;
|
||||
extern void checkweaponswitch();
|
||||
extern void weaponswitch(int gun);
|
||||
extern void setscope(bool activate);
|
||||
// Added by Rick
|
||||
extern dynent *botincrosshair();
|
||||
extern bool intersect(dynent *d, vec &from, vec &to, vec *end = NULL);
|
||||
|
||||
@@ -308,7 +308,7 @@ void damageblend(int n) { dblend += n; };
|
||||
VAR(hidestats, 0, 0, 1);
|
||||
VAR(crosshairfx, 0, 1, 1);
|
||||
|
||||
VAR(scopefov, 5, 50, 50);
|
||||
/*VAR(scopefov, 5, 50, 50);
|
||||
bool scoped = false;
|
||||
int oldfov = 100;
|
||||
|
||||
@@ -320,7 +320,7 @@ void togglescope(bool deactivate)
|
||||
scoped = !scoped;
|
||||
setvar("fov", scoped ? scopefov : oldfov);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater)
|
||||
{
|
||||
|
||||
@@ -289,7 +289,7 @@ bool vote(char *map, int reqmode, int sender)
|
||||
{
|
||||
if(!valid_client(sender)) return false;
|
||||
|
||||
if(configsets.length() && curcfgset < configsets.length() && !configsets[curcfgset].vote)
|
||||
if(configsets.length() && curcfgset < configsets.length() && !configsets[curcfgset].vote && !clients[sender].ismaster)
|
||||
{
|
||||
sprintf_sd(msg)("%s voted, but voting is currently disabled", clients[sender].name);
|
||||
sendservmsg(msg);
|
||||
@@ -1099,7 +1099,7 @@ void initserver(bool dedicated, int uprate, char *sdesc, char *ip, char *master,
|
||||
{
|
||||
serverpassword = passwd;
|
||||
maxclients = maxcl;
|
||||
servermsinit(master ? master : "cubebot.bots-united.com/cube/masterserver.cgi/", sdesc, dedicated);
|
||||
servermsinit(master ? master : "masterserver.cubers.net/cgi-bin/actioncube.pl/", sdesc, dedicated);
|
||||
|
||||
if(isdedicated = dedicated)
|
||||
{
|
||||
|
||||
+25
-5
@@ -49,7 +49,7 @@ void weaponswitch(int gun)
|
||||
void weapon(int gun)
|
||||
{
|
||||
if(m_nogun && gun!=G_MELEE && gun!=G_GRENADE) return;
|
||||
if(scoped) togglescope();
|
||||
setscope(false);
|
||||
if(NADE_IN_HAND || player1->reloading) return;
|
||||
|
||||
gun %= G_NUM;
|
||||
@@ -84,17 +84,37 @@ void shiftweapon(int i)
|
||||
COMMAND(weapon, ARG_1INT);
|
||||
COMMAND(shiftweapon, ARG_1INT);
|
||||
|
||||
void altattack()
|
||||
VAR(scopefov, 5, 50, 50);
|
||||
bool scoped = false;
|
||||
int oldfov = 100;
|
||||
|
||||
void setscope(bool activate)
|
||||
{
|
||||
if(player1->gunselect == GUN_SNIPER && player1->state!=CS_DEAD) togglescope();
|
||||
if(activate == scoped) return;
|
||||
if(activate)
|
||||
{
|
||||
oldfov = getvar("fov");
|
||||
setvar("fov", scopefov);
|
||||
}
|
||||
else
|
||||
{
|
||||
setvar("fov", oldfov);
|
||||
}
|
||||
scoped = activate;
|
||||
}
|
||||
|
||||
COMMAND(altattack, ARG_NONE);
|
||||
void altaction(int activate)
|
||||
{
|
||||
//if(player1->gunselect == GUN_SNIPER && player1->state!=CS_DEAD) togglescope();
|
||||
if(player1->gunselect == GUN_SNIPER && player1->state!=CS_DEAD) setscope(activate);
|
||||
}
|
||||
|
||||
COMMAND(altaction, ARG_1INT);
|
||||
|
||||
void reload(dynent *d)
|
||||
{
|
||||
if(!d || d->reloading) return;
|
||||
if(d == player1 && scoped) { togglescope(); };
|
||||
if(d == player1) setscope(false);
|
||||
bool akimbo = d->gunselect==GUN_PISTOL && d->akimbo!=0;
|
||||
|
||||
if(d->gunselect==GUN_KNIFE || d->gunselect==GUN_GRENADE) return;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user