mirror of
https://github.com/nzp-team/quakespasm.git
synced 2025-04-24 17:49:02 +00:00
Merge pull request #46 from Peter0x44/main
This commit is contained in:
commit
99ca44f339
10 changed files with 68 additions and 65 deletions
|
@ -685,7 +685,7 @@ void HUD_WorldText(float alpha)
|
|||
{
|
||||
// for parser
|
||||
char key[128], value[4096];
|
||||
char *data;
|
||||
const char *data;
|
||||
|
||||
// first, parse worldspawn
|
||||
data = COM_Parse(cl.worldmodel->entities);
|
||||
|
@ -1684,10 +1684,13 @@ void HUD_Achievement (void)
|
|||
|
||||
}
|
||||
|
||||
// from menu.c
|
||||
void Save_Achivements(void);
|
||||
|
||||
void HUD_Parse_Achievement (int ach)
|
||||
{
|
||||
if (achievement_list[ach].unlocked)
|
||||
return;
|
||||
if (achievement_list[ach].unlocked)
|
||||
return;
|
||||
|
||||
achievement_unlocked = 1;
|
||||
smallsec = 0;
|
||||
|
|
|
@ -334,7 +334,7 @@ qmodel_t *Mod_LoadModel (qmodel_t *mod, qboolean crash)
|
|||
buf = COM_LoadStackFile (mod->name, stackbuf, sizeof(stackbuf), & mod->path_id);
|
||||
if (!buf)
|
||||
{
|
||||
buf = (unsigned*)COM_LoadStackFile ("models/missing_model.mdl", stackbuf, sizeof(stackbuf), NULL);
|
||||
buf = COM_LoadStackFile ("models/missing_model.mdl", stackbuf, sizeof(stackbuf), NULL);
|
||||
if (buf){
|
||||
Con_Printf ("Missing model %s substituted\n", mod->name);
|
||||
}else if(!buf){
|
||||
|
|
|
@ -177,6 +177,25 @@ float GL_WaterAlphaForSurface (msurface_t *fa)
|
|||
return map_wateralpha;
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
R_InitOtherTextures
|
||||
==================
|
||||
*/
|
||||
void R_InitOtherTextures (void)
|
||||
{
|
||||
//static decals
|
||||
decal_blood1 = loadtextureimage ("textures/decals/blood_splat01");
|
||||
decal_blood2 = loadtextureimage ("textures/decals/blood_splat02");
|
||||
decal_blood3 = loadtextureimage ("textures/decals/blood_splat03");
|
||||
decal_q3blood = loadtextureimage ("textures/decals/blood_stain");
|
||||
decal_burn = loadtextureimage ("textures/decals/explo_burn01");
|
||||
decal_mark = loadtextureimage ("textures/decals/particle_burn01");
|
||||
decal_glow = loadtextureimage ("textures/decals/glow2");
|
||||
|
||||
// external zombie skin
|
||||
zombie_skin = loadtextureimage ("models/ai/zfull.mdl_0");
|
||||
}
|
||||
|
||||
/*
|
||||
===============
|
||||
|
@ -663,23 +682,3 @@ void GL_ClearBufferBindings ()
|
|||
GL_BindBufferFunc (GL_ELEMENT_ARRAY_BUFFER, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
==================
|
||||
R_InitOtherTextures
|
||||
==================
|
||||
*/
|
||||
void R_InitOtherTextures (void)
|
||||
{
|
||||
//static decals
|
||||
decal_blood1 = loadtextureimage ("textures/decals/blood_splat01");
|
||||
decal_blood2 = loadtextureimage ("textures/decals/blood_splat02");
|
||||
decal_blood3 = loadtextureimage ("textures/decals/blood_splat03");
|
||||
decal_q3blood = loadtextureimage ("textures/decals/blood_stain");
|
||||
decal_burn = loadtextureimage ("textures/decals/explo_burn01");
|
||||
decal_mark = loadtextureimage ("textures/decals/particle_burn01");
|
||||
decal_glow = loadtextureimage ("textures/decals/glow2");
|
||||
|
||||
// external zombie skin
|
||||
zombie_skin = loadtextureimage ("models/ai/zfull.mdl_0");
|
||||
}
|
||||
|
||||
|
|
|
@ -508,8 +508,8 @@ void QMB_InitParticles (void)
|
|||
|
||||
for (i = 0 ; i < 5 ; i++)
|
||||
ADD_PARTICLE_TEXTURE(ptex_q3blood, glpic, i, 5, i * 64, 128, (i + 1) * 64, 192);
|
||||
ADD_PARTICLE_TEXTURE(ptex_q3smoke, glpic, 0, 1, 256, 0, 384, 128);
|
||||
ADD_PARTICLE_TEXTURE(ptex_q3blood_trail, glpic, 0, 1, 320, 128, 384, 192);
|
||||
ADD_PARTICLE_TEXTURE(ptex_q3smoke, glpic, 0, 1, 256, 0, 384, 128);
|
||||
ADD_PARTICLE_TEXTURE(ptex_q3blood_trail, glpic, 0, 1, 320, 128, 384, 192);
|
||||
|
||||
loading_cur_step++;
|
||||
SCR_UpdateScreen ();
|
||||
|
|
|
@ -334,19 +334,19 @@ void SCR_UsePrint (int type, int cost, int weapon)
|
|||
button_pic_x = 5;
|
||||
break;
|
||||
case 2://debris
|
||||
strcpy(s, va("Hold %s to remove Debris\n", GetUseButtonL(), cost));
|
||||
strcpy(s, va("Hold %s to remove Debris\n", GetUseButtonL()));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
case 3://ammo
|
||||
strcpy(w, cl.touchname);
|
||||
strcpy(s, va("Hold %s to buy Ammo for %s\n", GetUseButtonL(), w, cost));
|
||||
strcpy(s, va("Hold %s to buy Ammo for %s\n", GetUseButtonL(), w));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
case 4://weapon
|
||||
strcpy(w, cl.touchname);
|
||||
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), w, cost));
|
||||
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), w));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
|
@ -356,7 +356,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
|
|||
button_pic_x = 5;
|
||||
break;
|
||||
case 6://box
|
||||
strcpy(s, va("Hold %s for Mystery Box\n", GetUseButtonL(), cost));
|
||||
strcpy(s, va("Hold %s for Mystery Box\n", GetUseButtonL()));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
|
@ -372,7 +372,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
|
|||
button_pic_x = 100;
|
||||
break;
|
||||
case 9://perk
|
||||
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), GetPerkName(weapon), cost));
|
||||
strcpy(s, va("Hold %s to buy %s\n", GetUseButtonL(), GetPerkName(weapon)));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
|
@ -382,12 +382,12 @@ void SCR_UsePrint (int type, int cost, int weapon)
|
|||
button_pic_x = 5;
|
||||
break;
|
||||
case 11://turn on trap
|
||||
strcpy(s, va("Hold %s to Activate the Trap\n", GetUseButtonL(), cost));
|
||||
strcpy(s, va("Hold %s to Activate the Trap\n", GetUseButtonL()));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
case 12://PAP
|
||||
strcpy(s, va("Hold %s to Pack-a-Punch\n", GetUseButtonL(), cost));
|
||||
strcpy(s, va("Hold %s to Pack-a-Punch\n", GetUseButtonL()));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
|
@ -402,7 +402,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
|
|||
button_pic_x = 5;
|
||||
break;
|
||||
case 15://use teleporter (cost)
|
||||
strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL(), cost));
|
||||
strcpy(s, va("Hold %s to use Teleporter\n", GetUseButtonL()));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
|
@ -427,7 +427,7 @@ void SCR_UsePrint (int type, int cost, int weapon)
|
|||
button_pic_x = 5;
|
||||
break;
|
||||
case 20://buyable ending
|
||||
strcpy(s, va("Hold %s to End the Game\n", GetUseButtonL(), cost));
|
||||
strcpy(s, va("Hold %s to End the Game\n", GetUseButtonL()));
|
||||
strcpy(c, va("[Cost: %i]\n", cost));
|
||||
button_pic_x = 5;
|
||||
break;
|
||||
|
|
|
@ -798,6 +798,7 @@ static qboolean VID_SetMode (int width, int height, int refreshrate, int bpp, qb
|
|||
#ifdef VITA
|
||||
depthbits = 24;
|
||||
gl_stencilbits = 8;
|
||||
fsaa_obtained = 0;
|
||||
#else
|
||||
// read the obtained z-buffer depth
|
||||
if (SDL_GL_GetAttribute(SDL_GL_DEPTH_SIZE, &depthbits) == -1)
|
||||
|
|
|
@ -115,7 +115,7 @@ void utf2ascii(char* dst, uint16_t* src){
|
|||
*dst=0x00;
|
||||
}
|
||||
|
||||
int nzp_main (unsigned int argc, char *argv[])
|
||||
int nzp_main (SceSize, void*)
|
||||
#else
|
||||
int main(int argc, char *argv[])
|
||||
#endif
|
||||
|
|
|
@ -601,6 +601,7 @@ void M_Menu_Main_f (void)
|
|||
m_entersound = true;
|
||||
|
||||
#ifdef VITA
|
||||
void Load_Achivements(void);
|
||||
Load_Achivements();
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -97,9 +97,9 @@ sys_socket_t UDP_Init (void)
|
|||
memset(&init_param, 0, sizeof(SceAppUtilInitParam));
|
||||
memset(&boot_param, 0, sizeof(SceAppUtilBootParam));
|
||||
sceAppUtilInit(&init_param, &boot_param);
|
||||
char nick[SCE_SYSTEM_PARAM_USERNAME_MAXSIZE];
|
||||
SceChar8 nick[SCE_SYSTEM_PARAM_USERNAME_MAXSIZE];
|
||||
sceAppUtilSystemParamGetString(SCE_SYSTEM_PARAM_ID_USERNAME, nick, SCE_SYSTEM_PARAM_USERNAME_MAXSIZE);
|
||||
Cvar_Set ("hostname", nick);
|
||||
Cvar_Set ("hostname", (const char*)nick);
|
||||
}
|
||||
#else
|
||||
if (gethostname(buff, MAXHOSTNAMELEN) != 0)
|
||||
|
|
|
@ -241,12 +241,11 @@ float V_CalcBob (float speed,float which)//0 = regular, 1 = side bobbing
|
|||
speed = 0.25;
|
||||
|
||||
if (which == 0)
|
||||
bob = cl_bobup.value * 20 * speed * (sprint * sprint) * sin(cl.time * 3.25 * sprint);
|
||||
else
|
||||
bob = cl_bobside.value * 50 * speed * (sprint * sprint * sprint) * sin((cl.time * 2 * sprint) - (M_PI * 0.25));
|
||||
}
|
||||
bob = cl_bobup.value * 20 * speed * (sprint * sprint) * sin(cl.time * 3.25 * sprint);
|
||||
else
|
||||
bob = cl_bobside.value * 50 * speed * (sprint * sprint * sprint) * sin((cl.time * 2 * sprint) - (M_PI * 0.25));
|
||||
} else {
|
||||
// Normal walk/sprint bob.
|
||||
else {
|
||||
if(cl.stats[STAT_ZOOM] == 3)
|
||||
sprint = 1.8; //this gets sprinting speed in comparison to walk speed per weapon
|
||||
|
||||
|
@ -1153,37 +1152,37 @@ void V_CalcRefdef (void)
|
|||
VectorAdd (r_refdef.viewangles, lastPunchAngle, r_refdef.viewangles);
|
||||
VectorAdd (r_refdef.viewangles, cl.gun_kick, r_refdef.viewangles);
|
||||
|
||||
// smooth out stair step ups
|
||||
if (cl.onground && ent->origin[2] - oldz > 0)
|
||||
{
|
||||
float steptime;
|
||||
// smooth out stair step ups
|
||||
if (cl.onground && ent->origin[2] - oldz > 0)
|
||||
{
|
||||
float steptime;
|
||||
|
||||
steptime = cl.time - cl.oldtime;
|
||||
if (steptime < 0)
|
||||
//FIXME I_Error ("steptime < 0");
|
||||
steptime = 0;
|
||||
steptime = cl.time - cl.oldtime;
|
||||
if (steptime < 0)
|
||||
//FIXME I_Error ("steptime < 0");
|
||||
steptime = 0;
|
||||
|
||||
oldz += steptime * 80;
|
||||
if (oldz > ent->origin[2])
|
||||
oldz += steptime * 80;
|
||||
if (oldz > ent->origin[2])
|
||||
oldz = ent->origin[2];
|
||||
if (ent->origin[2] - oldz > 12)
|
||||
oldz = ent->origin[2] - 12;
|
||||
r_refdef.vieworg[2] += oldz - ent->origin[2];
|
||||
view->origin[2] += oldz - ent->origin[2];
|
||||
}
|
||||
else
|
||||
oldz = ent->origin[2];
|
||||
if (ent->origin[2] - oldz > 12)
|
||||
oldz = ent->origin[2] - 12;
|
||||
r_refdef.vieworg[2] += oldz - ent->origin[2];
|
||||
view->origin[2] += oldz - ent->origin[2];
|
||||
}
|
||||
else
|
||||
oldz = ent->origin[2];
|
||||
|
||||
// Naievil -- fixme third person
|
||||
//if (chase_active.value)
|
||||
// Chase_Update ();
|
||||
|
||||
view2->origin[0] = view->origin[0];
|
||||
view2->origin[1] = view->origin[1];
|
||||
view2->origin[2] = view->origin[2];
|
||||
view2->angles[0] = view->angles[0];
|
||||
view2->angles[1] = view->angles[1];
|
||||
view2->angles[2] = view->angles[2];
|
||||
view2->origin[1] = view->origin[1];
|
||||
view2->origin[2] = view->origin[2];
|
||||
view2->angles[0] = view->angles[0];
|
||||
view2->angles[1] = view->angles[1];
|
||||
view2->angles[2] = view->angles[2];
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue