no message
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@352 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+1
-1
@@ -220,7 +220,7 @@ struct dynent // players & monsters
|
||||
int anger; // how many times already hit by fellow monster
|
||||
int flagscore; // EDIT: AH
|
||||
string name, team;
|
||||
int startheight;
|
||||
//int startheight;
|
||||
int shots; //keeps track of shots from auto weapons
|
||||
bool reloading, hasarmour, weaponchanging;
|
||||
int nextweapon; // weapon we switch to
|
||||
|
||||
+2
-1
@@ -161,7 +161,8 @@ int main(int argc, char **argv)
|
||||
if(!installtex(2, path(newstring("packages/misc/newchars.png")), xs, ys) ||
|
||||
!installtex(3, path(newstring("packages/misc/base.png")), xs, ys) ||
|
||||
!installtex(7, path(newstring("packages/misc/smoke.png")), xs, ys) ||
|
||||
!installtex(8, path(newstring("packages/misc/full_logo.png")), xs, ys) ||
|
||||
!installtex(8, path(newstring("packages/misc/full_logo.png")), xs, ys, false, true) ||
|
||||
!installtex(6, path(newstring("packages/textures/makke/menu.jpg")), xs, ys, false, true) ||
|
||||
!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) ||
|
||||
|
||||
+9
-22
@@ -12,7 +12,6 @@ struct gmenu
|
||||
vector<mitem> items;
|
||||
int mwidth;
|
||||
int menusel;
|
||||
int tex; // (optional) bg tex
|
||||
char *mdl; // (optional) md2 mdl
|
||||
int frame, range, rotspeed, scale;
|
||||
};
|
||||
@@ -76,7 +75,7 @@ bool rendermenu()
|
||||
int h = (mdisp+2)*step;
|
||||
int y = (VIRTH-h)/2;
|
||||
int x = (VIRTW-w)/2;
|
||||
blendbox(x-FONTH/2*3, y-FONTH, x+w+FONTH/2*3, y+h+FONTH, true, m.tex >= 0 ? FIRSTMENU + m.tex : -1);
|
||||
blendbox(x-FONTH/2*3, y-FONTH, x+w+FONTH/2*3, y+h+FONTH, true, 6);
|
||||
draw_text(title, x, y,2);
|
||||
y += FONTH*2;
|
||||
if(vmenu && vmenu!=2)
|
||||
@@ -98,35 +97,37 @@ void rendermenumdl()
|
||||
if(vmenu==1) refreshservers();
|
||||
gmenu &m = menus[vmenu];
|
||||
if(!m.mdl) return;
|
||||
|
||||
|
||||
glPushMatrix ();
|
||||
|
||||
glTranslatef(player1->o.x, player1->o.z, player1->o.y);
|
||||
glRotatef(player1->yaw+90+180, 0, -1, 0);
|
||||
glRotatef(player1->pitch, 0, 0, 1);
|
||||
|
||||
float z=0.0f;
|
||||
vec pos = { 0.0f, 0.0f, 0.0f };
|
||||
bool isplayermodel = !strncmp(m.mdl, "playermodels", strlen("playermodels"));
|
||||
|
||||
if(isplayermodel)
|
||||
{
|
||||
glTranslatef(2.0f, 1.0f, 1.5f);
|
||||
z = -1.0f;
|
||||
pos.z = -1.0f;
|
||||
}
|
||||
else
|
||||
{
|
||||
glTranslatef(2.0f, 1.7f, 0.0f);
|
||||
//glTranslatef(1.0f, 0.32f, 0);
|
||||
//pos.y = 0.1f;
|
||||
glTranslatef(2.0f, 1.7f, 0);
|
||||
};
|
||||
|
||||
if(m.rotspeed) glRotatef(lastmillis/5.0f/100.0f*m.rotspeed, 0, 1, 0);
|
||||
rendermodel(m.mdl, m.frame, m.range, 0.0f, 0.0f, 0.0f, z, 0, 0, 0, false, (float)(m.scale ? m.scale/25.0f : 1), 100, 0, 0, false);
|
||||
rendermodel(m.mdl, m.frame, m.range, 0.0f, 0.0f, pos.x, pos.z, pos.y, 0, 0, false, (float)(m.scale ? m.scale/25.0f : 1.0f), 100, 0, 0, false);
|
||||
|
||||
if(isplayermodel)
|
||||
{
|
||||
string vwep;
|
||||
strcpy_s(vwep, "weapons/subgun/world");
|
||||
path(vwep);
|
||||
rendermodel(vwep, m.frame, m.range, 0.0f, 0.0f, 0.0f, z, 0, 0, 0, false, (float)(m.scale ? m.scale/25.0f : 1), 100, 0, 0, false);
|
||||
rendermodel(vwep, m.frame, m.range, 0.0f, 0.0f, pos.x, pos.z, pos.y, 0, 0, false, (float)(m.scale ? m.scale/25.0f : 1.0f), 100, 0, 0, false);
|
||||
};
|
||||
|
||||
glPopMatrix();
|
||||
@@ -137,7 +138,6 @@ void newmenu(char *name)
|
||||
gmenu &menu = menus.add();
|
||||
menu.name = newstring(name);
|
||||
menu.menusel = 0;
|
||||
menu.tex = -1;
|
||||
menu.mdl = NULL;
|
||||
};
|
||||
|
||||
@@ -159,18 +159,6 @@ void menuitem(char *text, char *action, char *hoveraction)
|
||||
else mi.hoveraction = NULL;
|
||||
};
|
||||
|
||||
void menubg(char *tex)
|
||||
{
|
||||
gmenu &menu = menus.last();
|
||||
int curmtex = 0;
|
||||
loopv(menus) curmtex = max(curmtex, menus[i].tex);
|
||||
if(curmtex>=100) return;
|
||||
sprintf_sd(path)("packages/%s", tex);
|
||||
int xs, ys;
|
||||
if(installtex(FIRSTMENU + curmtex, path, xs, ys, false, true))
|
||||
menu.tex = curmtex;
|
||||
};
|
||||
|
||||
void menumdl(char *mdl, char *frame, char *range, char *rotspeed, char *scale)
|
||||
{
|
||||
if(!mdl || !frame || !range) return;
|
||||
@@ -205,7 +193,6 @@ void chmenumdl(char *menu, char *mdl, char *frame, char *range, char *rotspeed,
|
||||
COMMAND(menuitem, ARG_3STR);
|
||||
COMMAND(showmenu, ARG_1STR);
|
||||
COMMAND(newmenu, ARG_1STR);
|
||||
COMMAND(menubg, ARG_1STR);
|
||||
COMMAND(menumdl, ARG_5STR);
|
||||
COMMAND(chmenumdl, ARG_6STR);
|
||||
|
||||
|
||||
@@ -157,7 +157,6 @@ bool collide(dynent *d, bool spawn, float drop, float rise)
|
||||
if(spawn)
|
||||
{
|
||||
d->o.z = lo+d->eyeheight; // just drop to floor (sideeffect)
|
||||
d->startheight = d->o.z; //no falling damage on spawn
|
||||
d->onfloor = true;
|
||||
}
|
||||
else
|
||||
@@ -286,20 +285,8 @@ void moveplayer(dynent *pl, int moveres, bool local, int curtime)
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(pl->onfloor || water)
|
||||
{
|
||||
if(pl->onfloor || !pl->vel.z)
|
||||
{
|
||||
int damage = (int)pl->startheight - (int)pl->o.z;
|
||||
if (damage > 8 && local) //try adding "&& local" if falling not fixed
|
||||
{
|
||||
selfdamage(damage,-1,pl);
|
||||
demodamage(damage, player1->o);
|
||||
//playsound(S_FALL1+rnd(2), &pl->o); // fixme sound
|
||||
};
|
||||
pl->startheight=pl->o.z;
|
||||
};
|
||||
|
||||
if(pl->jumpnext)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user