no message

git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@302 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
driAn
2006-06-09 12:22:46 +00:00
parent b24da8eff1
commit 3d4ea805d3
53 changed files with 21488 additions and 21474 deletions
+2 -1
View File
@@ -1 +1,2 @@
bin_win32\ac_client.exe -w1024 -h768 %1 %2 %3 %4 %5
bin_win32\ac_client.exe -w1280 -h1024 %1 %2 %3 %4 %5
pause
+13 -35
View File
@@ -2,7 +2,7 @@
// and all your keybindings that are different from the default (see keymap.cfg)
name "unarmed" // change!
team "AC"
team "cuber"
invmouse 0 // 1 for flightsim mode
sensitivity 25
@@ -69,14 +69,18 @@ alias universaldelta [
bind MOUSE4 [ universaldelta 1 ]
bind MOUSE5 [ universaldelta -1 ]
//bind 1 "weapon 1"
//bind 2 "weapon 2"
//bind 3 "weapon 3"
//bind 4 "weapon 4"
//bind 5 "weapon 5"
//bind 6 "weapon 6"
alias primary [ weapon 0 ]
alias secondary [ weapon 1 ]
alias melee [ weapon 2 ]
alias grenade [ weapon 3 ]
bind 1 primary
bind 2 secondary
bind 3 melee
bind 4 grenade
bind R reload
bind MOUSE2 "scoped 1; onrelease [ scoped 0 ]"
bind MOUSE2 [ altattack ]
alias delta_edit_0 [ editheight $flrceil $arg1 ]
alias delta_edit_1 [ if $flrceil [ vdelta $arg1 ] [ vdelta (- 0 $arg1) ] ]
@@ -85,39 +89,13 @@ alias delta_edit_3 [ edittex (+ $flrceil 1) $arg1 ]
alias delta_edit_4 [ equalize $flrceil ]
alias delta_edit_5 [ entproperty 0 $arg1 ] // and the others
alias delta_game_0 [ if (= $arg1 1) [ wup ] [ wdw ] ]
alias zfov 100
alias delta_game_1 [
alias zfov (+ $zfov (* $arg1 (div $zfov -5)))
if (< $zfov 10) [ alias zfov 10 ]
if (> $zfov 120) [ alias zfov 120 ]
fov $zfov
]
alias delta_game_0 [ if (= $arg1 1) [ shiftweapon 1 ] [ shiftweapon -1 ] ]
if (only_menu_music) [ musicvol 1; music $menu_music ]
bind p "connect 67.163.146.134"
// change
hudgun 1
bind KP_MINUS "conskip 1"
bind KP_PLUS "conskip -1"
bind 1 "newent light 16 100"
bind 2 "newent light 13 120"
bind 3 "newent light 10 150"
bind 4 "newent light 8 150"
bind 5 "newent light 6 175"
bind 6 "newent light 5 180"
bind 7 "newent light 4 100"
bind 8 "newent light 3 225"
bind 9 "newent light 2 225"
bind right "vdelta 1"
bind left "vdelta -1"
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+3 -4
View File
@@ -19,12 +19,11 @@
#if (defined __linux__)
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#else
#include <sys\stat.h>
#endif
#include <unistd.h>
extern dvector monsters;
// Function code by PMB - Begin
@@ -419,7 +418,7 @@ bool IsValidFile(const char *szFileName)
bool FileIsOlder(const char *szFileName1, const char *szFileName2)
{
int file1, file2;
/* int file1, file2;
struct stat stat1, stat2;
file1 = open(szFileName1, O_RDONLY);
@@ -431,7 +430,7 @@ bool FileIsOlder(const char *szFileName1, const char *szFileName2)
close(file1);
close(file2);
return(stat1.st_mtime < stat2.st_mtime);
return(stat1.st_mtime < stat2.st_mtime);*/ return false; // FIXME
}
vec Normalize(vec v)
+1 -1
View File
@@ -1428,7 +1428,7 @@ bool CWaypointClass::CanPlaceNodeHere(const vec &from)
return false;
}
if (fabs(s->ceil - s->floor) < player1->radius)
if (fabs((float)(s->ceil - s->floor)) < player1->radius)
{
return false;
}
+3 -3
View File
@@ -869,9 +869,9 @@ void CBotManager::PickNextTrigger()
{
entity &e = ents[i];
#if defined AC_BUBE
if ((e.type != TRIGGER) || !e.spawned)
continue;
#if defined AC_CUBE
/* if ((e.type != TRIGGER) || !e.spawned)
continue;*/
#elif defined VANILLA_CUBE
if ((e.type != CARROT) || !e.spawned)
continue;
+2 -1
View File
@@ -106,6 +106,7 @@ dynent *newdynent() // create a new blank player or monster
d->onladder = false;
d->isphysent = false;
d->skin = d->nextskin = 0;
d->bIsBot = false;
spawnstate(d);
return d;
};
@@ -587,7 +588,7 @@ void startmap(char *name) // called just after a map load
sleepwait = 0;
//monsterclear();
// Added by Rick
BotManager.BeginMap(name);
//BotManager.BeginMap(name); FIXME
// End add by Rick
projreset();
if(m_ctf) preparectf();
+2
View File
@@ -46,6 +46,7 @@ enum // static entity types
CARROT, // attr1 = tag, attr2 = type
LADDER,
CTF_FLAG, // attr1 = angle, attr2 = red/blue
SMOKESOURCE, // attr1 = type, attr2 = particles
MAXENTTYPES
};
@@ -416,6 +417,7 @@ enum // function signatures for script functions, see command.cpp
#define ATOI(s) strtol(s, NULL, 0) // supports hexadecimal numbers
#ifdef WIN32
#define strcasecmp strcmp // fixme
#define WIN32_LEAN_AND_MEAN
#include "windows.h"
#define _WINDOWS
+20
View File
@@ -17,6 +17,8 @@ void renderent(entity &e, char *mdlname, float z, float yaw, int frame = 0, int
rendermodel(mdlname, frame, numf, 0, 1.1f, e.x, z+S(e.x, e.y)->floor, e.y, yaw, 0, false, 1.0f, speed, 0, basetime);
};
extern void newparticle(vec &o, vec &d, int fade, int type, int tex = -1);
void renderentities()
{
if(lastmillis>triggertime+1000) triggertime = 0;
@@ -48,6 +50,24 @@ void renderentities()
rendermodel(mmi.name, 0, 7, 0, (float)mmi.rad, e.x, f.state==CTFF_INBASE ? (float)S(e.x, e.y)->floor : e.z, e.y, (float)((e.attr1+7)-(e.attr1+7)%15), 0, false, 1.0f, 120.0f, mmi.snap);
};
}
else if(e.type==SMOKESOURCE)
{
vec o, to;
o.x = e.x;
o.y = e.y;
o.z = e.z;
to = o;
to.z += 1000;
//newparticle(o, to, 10000, 5);
static int lastsplash = lastmillis;
if(lastmillis - lastsplash > 100)
{
particle_splash(e.attr1, e.attr2, 1000, o);
lastsplash = lastmillis;
}
}
else
{
if(OUTBORD(e.x, e.y)) continue;
-3
View File
@@ -160,10 +160,7 @@ int main(int argc, char **argv)
int xs, ys;
if(!installtex(2, path(newstring("packages/misc/newchars.png")), xs, ys) ||
!installtex(3, path(newstring("packages/misc/martin/base.png")), xs, ys) ||
!installtex(6, path(newstring("packages/misc/martin/ball1.png")), xs, ys) ||
!installtex(7, path(newstring("packages/misc/martin/smoke.png")), xs, ys) ||
!installtex(8, path(newstring("packages/misc/martin/ball2.png")), xs, ys) ||
!installtex(9, path(newstring("packages/misc/martin/ball3.png")), xs, ys) ||
!installtex(4, path(newstring("packages/misc/explosion.jpg")), xs, ys) ||
!installtex(5, path(newstring("packages/misc/items.png")), xs, ys) ||
!installtex(10, path(newstring("packages/misc/scope.png")), xs, ys) ||
+4
View File
@@ -57,6 +57,9 @@ void refreshservers();
bool rendermenu()
{
if(vmenu<0) { menustack.setsize(0); return false; };
if(scoped) togglescope();
if(vmenu==1) refreshservers();
gmenu &m = menus[vmenu];
sprintf_sd(title)(vmenu>0 && vmenu!=2 ? "[ %s menu ]" : "%s", m.name); // EDIT: AH
@@ -191,6 +194,7 @@ bool menukey(int code, bool isdown)
{
if(vmenu<=0 || vmenu == 2) return false; // EDIT: AH
int menusel = menus[vmenu].menusel;
if(isdown)
{
int oldmenusel = menusel;
+1
View File
@@ -172,6 +172,7 @@ extern void rendershotlines();
extern void shotlinereset();
extern void renderphysents();
extern bool scoped;
extern void togglescope(bool deactivate = false);
// renderparticles
extern void setorient(vec &r, vec &u);
+8 -8
View File
@@ -155,7 +155,7 @@ char *entnames[] =
"clips", "ammobox","grenades",
"health", "armour", "akimbo",
"mapmodel", "trigger",
"ladder", "ctf-flag", "?", "?", "?",
"ladder", "ctf-flag", "smokesource", "?", "?",
};
void renderents() // show sparkly thingies for map entities in edit mode
@@ -275,18 +275,18 @@ VAR(scopefov, 5, 50, 50);
bool scoped = false;
int oldfov = 100;
void togglescope()
void togglescope(bool deactivate)
{
if(player1->gunselect!=GUN_SNIPER) return;
if(!scoped) oldfov = getvar("fov");
scoped = !scoped;
setvar("fov", scoped ? scopefov : oldfov);
if(player1->gunselect==GUN_SNIPER)
{
if(!scoped) oldfov = getvar("fov");
scoped = !scoped;
setvar("fov", scoped ? scopefov : oldfov);
}
}
COMMAND(togglescope, ARG_NONE);
void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwater)
{
readmatrices();
if(editmode)
{
+1 -3
View File
@@ -58,7 +58,7 @@ void render_particles(int time)
struct parttype { float r, g, b; int gr, tex; float sz; } parttypes[] =
{
{ 0.7f, 0.6f, 0.3f, 2, 3, 0.06f }, // yellow: sparks
{ 0.2f, 0.2f, 0.2f, 2, 3, 0.06f }, // yellow: sparks
{ 0.5f, 0.5f, 0.5f, 20, 7, 0.15f }, // grey: small smoke
{ 0.2f, 0.2f, 1.0f, 20, 3, 0.08f }, // blue: edit mode entities
{ 1.0f, 0.1f, 0.1f, 1, 7, 0.06f }, // red: blood spats
@@ -142,5 +142,3 @@ void particle_trail(int type, int fade, vec &s, vec &e)
newparticle(p, d, rnd(fade)+fade, type);
};
};
+16 -3
View File
@@ -25,8 +25,10 @@ bool gun_changed = false;
void weapon(int gun)
{
if(gun>=0) gun %= G_NUM;
else gun = G_NUM-(gun % G_NUM);
if(scoped) togglescope();
gun %= G_NUM;
if(gun<0) gun = G_NUM+gun;
gun_changed = true;
switch(gun)
{
@@ -39,6 +41,8 @@ void weapon(int gun)
void shiftweapon(int i)
{
if(scoped) togglescope();
int gun;
switch(player1->gunselect)
{
@@ -54,10 +58,19 @@ void shiftweapon(int i)
COMMAND(weapon, ARG_1INT);
COMMAND(shiftweapon, ARG_1INT);
void altattack()
{
if(player1->gunselect == GUN_SNIPER) togglescope();
}
COMMAND(altattack, ARG_NONE);
void reload(dynent *d)
{
if(!d) return;
if(scoped) togglescope();
bool akimbo = d->gunselect==GUN_PISTOL && d->akimbo!=0;
if(d->gunselect==GUN_KNIFE || d->gunselect==GUN_GRENADE) return;
@@ -520,7 +533,7 @@ void shootv(int gun, vec &from, vec &to, dynent *d, bool local, int nademillis)
case GUN_SUBGUN:
case GUN_ASSULT:
addshotline(d, from, to);
particle_splash(9, 5, 250, to);
particle_splash(0, 5, 250, to);
//particle_trail(1, 10, from, to);
break;