minor code "fixes"
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@7276 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
@@ -347,22 +347,21 @@ void editdrag(bool isdown)
|
||||
lasty = cy;
|
||||
lasth = ch;
|
||||
tofronttex();
|
||||
|
||||
extern vector<keym> keyms;
|
||||
vector<char *> elems;
|
||||
|
||||
bool ctrlpressed = false;
|
||||
|
||||
if (identexists("newselkeys"))
|
||||
{
|
||||
for (int i = 0; i < keyms.length(); i++)
|
||||
if(keyms[i].pressed)
|
||||
extern vector<keym> keyms;
|
||||
vector<char *> elems;
|
||||
explodelist(getalias("newselkeys"), elems);
|
||||
|
||||
loopi(keyms.length()) if(keyms[i].pressed) loopj(elems.length())
|
||||
{
|
||||
explodelist(getalias("newselkeys"), elems);
|
||||
for (int j = 0; j < elems.length(); j++)
|
||||
if (strcmp(keyms[i].name, elems[j]) == 0)
|
||||
{
|
||||
if (strcmp(keyms[i].name, elems[j]) == 0)
|
||||
{ ctrlpressed = true; break; }
|
||||
ctrlpressed = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1051,7 +1051,7 @@ void gl_drawhud(int w, int h, int curfps, int nquads, int curvert, bool underwat
|
||||
glPushMatrix();
|
||||
glOrtho(0, VIRTW, VIRTH, 0, -1, 1);
|
||||
glScalef(0.8, 0.8, 1);
|
||||
draw_textf("Speed: %.2f", VIRTW/2, VIRTH, sqrtf(p->vel.x*p->vel.x + p->vel.y*p->vel.y));
|
||||
draw_textf("Speed: %.2f", VIRTW/2, VIRTH, p->vel.magnitudexy());
|
||||
glPopMatrix();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user