A couple of fixes and a small change to enable fast weapon switching (one wheel click = one weapon switch, no delay before being allowed to switch again)

git-svn-id: https://svn.eduke32.com/eduke32@66 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2006-04-19 04:24:06 +00:00
parent 736c6abd8d
commit 8524a949c4
3 changed files with 6 additions and 5 deletions

View file

@ -8671,6 +8671,7 @@ char opendemoread(char which_demo) // 0 = mine
if (kread(recfilep,(int32 *)&ps[i].auto_aim,sizeof(int32)) != sizeof(int32)) goto corrupt; // JBF 20031126
if (kread(recfilep,(int32 *)&ps[i].weaponswitch,sizeof(int32)) != sizeof(int32)) goto corrupt;
if (kread(recfilep,(int32 *)&ud.pcolor[i],sizeof(int32)) != sizeof(int32)) goto corrupt;
ps[i].palookup = ud.pcolor[i];
} else {
if (kread(recfilep,(int32 *)&ps[i].aim_mode,sizeof(char)) != sizeof(char)) goto corrupt;
OSD_Printf("aim_mode: %d\n",ps[i].aim_mode);

View file

@ -468,7 +468,7 @@ int osdcmd_cvar_set(const osdfuncparm_t *parm)
{
int val;
if (showval) {
OSD_Printf("%s: %d\n",cvar[i].name,*(int*)cvar[i].var);
OSD_Printf("\"%s\" is \"%d\"\n%s\n",cvar[i].name,*(int*)cvar[i].var,(char*)cvar[i].helpstr);
return OSDCMD_OK;
}
@ -480,18 +480,18 @@ int osdcmd_cvar_set(const osdfuncparm_t *parm)
return OSDCMD_OK;
}
*(int*)cvar[i].var = val;
OSD_Printf("%s %d",cvar[i].name,*(int*)cvar[i].var);
OSD_Printf("%s %d",cvar[i].name,val);
} break;
case CVAR_STRING:
{
if (showval) {
OSD_Printf("%s: \"%s\"\n",cvar[i].name,(char*)cvar[i].var);
OSD_Printf("\"%s\" is \"%s\"\n%s\n",cvar[i].name,(char*)cvar[i].var,(char*)cvar[i].helpstr);
return OSDCMD_OK;
}
else {
Bstrncpy((char*)cvar[i].var, parm->parms[0], cvar[i].extra-1);
((char*)cvar[i].var)[cvar[i].extra-1] = 0;
OSD_Printf("%s \"%s\"",cvar[i].name,(char*)cvar[i].var);
OSD_Printf("%s %s",cvar[i].name,(char*)cvar[i].var);
}
} break;
default: break;

View file

@ -2834,7 +2834,7 @@ CHECKINV1:
}
if(p->last_pissed_time <= (26*218) && p->show_empty_weapon == 0 && p->kickback_pic == 0 && p->quick_kick == 0 && sprite[p->i].xrepeat > 32 && p->access_incs == 0 && p->knee_incs == 0 )
{
if( ( p->weapon_pos == 0 || ( p->holster_weapon && p->weapon_pos == -9 ) ))
// if( ( p->weapon_pos == 0 || ( p->holster_weapon && p->weapon_pos == -9 ) ))
{
if(j == 10 || j == 11)
{