From c7015183c44779446e8bed78f24f79982b0a0a92 Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Tue, 21 Feb 2023 17:13:35 -0500 Subject: [PATCH 1/6] Stop drawing menu maps as custom maps in Quakespasm --- source/menu.c | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/source/menu.c b/source/menu.c index e34bd5e..f05e157 100644 --- a/source/menu.c +++ b/source/menu.c @@ -107,6 +107,14 @@ typedef struct usermap_t custom_maps[50]; +#define BASE_MAP_COUNT 3 +char* base_maps [] = +{ + "ndu", + "warehouse", + "christmas_special" +}; + enum m_state_e m_state; int old_m_state; @@ -1706,9 +1714,24 @@ void Map_Finder(void) { while ((ent = readdir(dir))) { - if(!strcmp(COM_FileGetExtension(ent->d_name),"bsp") || !strcmp(COM_FileGetExtension(ent->d_name),"BSP")) { + if(!strcmp(COM_FileGetExtension(ent->d_name),"bsp") || !strcmp(COM_FileGetExtension(ent->d_name),"BSP")) + { + qboolean breakaway = false; char ntype[32]; COM_StripExtension(ent->d_name, ntype, sizeof(ntype)); + + for (int j = 0; j < BASE_MAP_COUNT; j++) + { + if (breakaway == true) + return; + + if(!strcmp(ntype, base_maps[j])) + breakaway = true; + } + + if (breakaway == true) + continue; + custom_maps[user_maps_num].occupied = true; custom_maps[user_maps_num].map_name = malloc(sizeof(char)*32); sprintf(custom_maps[user_maps_num].map_name, "%s", ntype); From 5e55f863b03d49475c70a1dbc691bea41c08e772 Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Sat, 25 Feb 2023 22:06:12 -0500 Subject: [PATCH 2/6] [CLIENT] Disable fog for Vita (for now) --- .gitignore | 1 + Makefile.vita | 2 +- source/gl_rmain.c | 8 +++---- source/gl_sky.c | 2 ++ source/r_alias.c | 20 +++++++++++++++++ source/r_brush.c | 26 ++++++++++++++++++++-- source/r_world.c | 56 ++++++++++++++++++++++++++++++++--------------- 7 files changed, 90 insertions(+), 25 deletions(-) diff --git a/.gitignore b/.gitignore index 07d4bb4..ebcef5f 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ assets/vita/eboot.bin *.nacl *.sfo *.bin +*.o diff --git a/Makefile.vita b/Makefile.vita index de1cd21..c084f39 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -268,7 +268,7 @@ nzp.vpk: nzp.velf mv nzp.elf build/vita/ mv nzp.elf.unstripped.elf build/vita/ mv nzp.velf build/vita/ - mv source/*.o build/vita/ + #mv source/*.o build/vita/ %.velf: %.elf cp $< $<.unstripped.elf diff --git a/source/gl_rmain.c b/source/gl_rmain.c index b3a0402..8a56b52 100644 --- a/source/gl_rmain.c +++ b/source/gl_rmain.c @@ -1166,9 +1166,9 @@ R_RenderScene void R_RenderScene (void) { R_SetupScene (); //johnfitz -- this does everything that should be done once per call to RenderScene - +#ifndef VITA Fog_EnableGFog (); //johnfitz - +#endif Sky_DrawSky (); //johnfitz R_DrawWorld (); @@ -1188,9 +1188,9 @@ void R_RenderScene (void) R_DrawParticles (); QMB_DrawParticles(); - +#ifndef VITA Fog_DisableGFog (); //johnfitz - +#endif R_DrawViewModel (); //johnfitz -- moved here from R_RenderView R_DrawView2Model (); diff --git a/source/gl_sky.c b/source/gl_sky.c index 48b0831..1cf43f6 100644 --- a/source/gl_sky.c +++ b/source/gl_sky.c @@ -1026,5 +1026,7 @@ void Sky_DrawSky (void) glDepthMask(1); glDepthFunc(GL_LEQUAL); } +#ifndef VITA Fog_EnableGFog (); +#endif } diff --git a/source/r_alias.c b/source/r_alias.c index 1229fe7..d078565 100644 --- a/source/r_alias.c +++ b/source/r_alias.c @@ -1191,9 +1191,13 @@ void R_DrawAliasModel (entity_t *e) glBlendFunc (GL_ONE, GL_ONE); glDepthMask(GL_FALSE); glColor3f(entalpha,entalpha,entalpha); +#ifndef VITA Fog_StartAdditive (); +#endif GL_DrawAliasFrame (paliashdr, lerpdata); +#ifndef VITA Fog_StopAdditive (); +#endif glDepthMask(GL_TRUE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_BLEND); @@ -1254,9 +1258,13 @@ void R_DrawAliasModel (entity_t *e) glDepthMask(GL_FALSE); shading = false; glColor3f(entalpha,entalpha,entalpha); +#ifndef VITA Fog_StartAdditive (); +#endif GL_DrawAliasFrame (paliashdr, lerpdata); +#ifndef VITA Fog_StopAdditive (); +#endif glDepthMask(GL_TRUE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_BLEND); @@ -1273,9 +1281,13 @@ void R_DrawAliasModel (entity_t *e) glEnable(GL_BLEND); glBlendFunc (GL_ONE, GL_ONE); glDepthMask(GL_FALSE); +#ifndef VITA Fog_StartAdditive (); +#endif GL_DrawAliasFrame (paliashdr, lerpdata); +#ifndef VITA Fog_StopAdditive (); +#endif glDepthMask(GL_TRUE); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); @@ -1290,9 +1302,13 @@ void R_DrawAliasModel (entity_t *e) glDepthMask(GL_FALSE); shading = false; glColor3f(entalpha,entalpha,entalpha); +#ifndef VITA Fog_StartAdditive (); +#endif GL_DrawAliasFrame (paliashdr, lerpdata); +#ifndef VITA Fog_StopAdditive (); +#endif glDepthMask(GL_TRUE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_BLEND); @@ -1331,9 +1347,13 @@ void R_DrawAliasModel (entity_t *e) glDepthMask(GL_FALSE); shading = false; glColor3f(entalpha,entalpha,entalpha); +#ifndef VITA Fog_StartAdditive (); +#endif GL_DrawAliasFrame (paliashdr, lerpdata); +#ifndef VITA Fog_StopAdditive (); +#endif glDepthMask(GL_TRUE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable(GL_BLEND); diff --git a/source/r_brush.c b/source/r_brush.c index 441b576..d2a9b83 100644 --- a/source/r_brush.c +++ b/source/r_brush.c @@ -370,10 +370,14 @@ void R_DrawSequentialPoly (msurface_t *s) else //case 3: texture in one pass, lightmap in second pass using 2x modulation blend func, fog in third pass { //first pass -- texture with no fog +#ifndef VITA Fog_DisableGFog (); +#endif VITA GL_Bind (t->gltexture); DrawGLPoly (s->polys); +#ifndef VITA Fog_EnableGFog (); +#endif rs_brushpasses++; //second pass -- lightmap with black fog, modulate blended @@ -382,7 +386,9 @@ void R_DrawSequentialPoly (msurface_t *s) glDepthMask (GL_FALSE); glEnable (GL_BLEND); glBlendFunc(GL_DST_COLOR, GL_SRC_COLOR); //2x modulate +#ifndef VITA Fog_StartAdditive (); +#endif #ifdef VITA glBegin(GL_TRIANGLE_FAN); #else @@ -395,10 +401,13 @@ void R_DrawSequentialPoly (msurface_t *s) glVertex3fv (v); } glEnd (); +#ifndef VITA Fog_StopAdditive (); +#endif rs_brushpasses++; //third pass -- black geo with normal fog, additive blended +#ifndef VITA if (Fog_GetDensity() > 0) { glBlendFunc(GL_ONE, GL_ONE); //add @@ -409,6 +418,7 @@ void R_DrawSequentialPoly (msurface_t *s) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); rs_brushpasses++; } +#endif glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable (GL_BLEND); @@ -451,10 +461,14 @@ void R_DrawSequentialPoly (msurface_t *s) else //case 6: texture in one pass, lightmap in a second pass, fog in third pass { //first pass -- texture with no fog +#ifndef VITA Fog_DisableGFog (); +#endif GL_Bind (t->gltexture); DrawGLPoly (s->polys); +#ifndef VITA Fog_EnableGFog (); +#endif rs_brushpasses++; //second pass -- lightmap with black fog, modulate blended @@ -463,7 +477,9 @@ void R_DrawSequentialPoly (msurface_t *s) glDepthMask (GL_FALSE); glEnable (GL_BLEND); glBlendFunc (GL_ZERO, GL_SRC_COLOR); //modulate +#ifndef VITA Fog_StartAdditive (); +#endif #ifdef VITA glBegin(GL_TRIANGLE_FAN); #else @@ -476,9 +492,11 @@ void R_DrawSequentialPoly (msurface_t *s) glVertex3fv (v); } glEnd (); +#ifndef VITA Fog_StopAdditive (); +#endif rs_brushpasses++; - +#ifndef VITA //third pass -- black geo with normal fog, additive blended if (Fog_GetDensity() > 0) { @@ -490,7 +508,7 @@ void R_DrawSequentialPoly (msurface_t *s) glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); rs_brushpasses++; } - +#endif glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable (GL_BLEND); glDepthMask (GL_TRUE); @@ -517,9 +535,13 @@ fullbrights: glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glColor3f (entalpha, entalpha, entalpha); GL_Bind (t->fullbright); +#ifndef VITA Fog_StartAdditive (); +#endif DrawGLPoly (s->polys); +#ifndef VITA Fog_StopAdditive (); +#endif glColor3f(1, 1, 1); glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); diff --git a/source/r_world.c b/source/r_world.c index febab07..9517616 100644 --- a/source/r_world.c +++ b/source/r_world.c @@ -1197,24 +1197,32 @@ void R_DrawTextureChains (qmodel_t *model, entity_t *ent, texchain_t chain) //to make fog work with multipass lightmapping, need to do one pass //with no fog, one modulate pass with black fog, and one additive //pass with black geometry and normal fog +#ifndef VITA Fog_DisableGFog (); +#endif R_DrawTextureChains_TextureOnly (model, ent, chain); +#ifndef VITA Fog_EnableGFog (); +#endif glDepthMask (GL_FALSE); glEnable (GL_BLEND); glBlendFunc (GL_DST_COLOR, GL_SRC_COLOR); //2x modulate +#ifndef VITA Fog_StartAdditive (); +#endif R_DrawLightmapChains (); +#ifndef VITA Fog_StopAdditive (); - //if (Fog_GetDensity() > 0) - //{ - //glBlendFunc(GL_ONE, GL_ONE); //add - //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - //glColor3f(0,0,0); - //R_DrawTextureChains_TextureOnly (model, ent, chain); - //glColor3f(1,1,1); - //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - //} + if (Fog_GetDensity() > 0) + { + glBlendFunc(GL_ONE, GL_ONE); //add + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glColor3f(0,0,0); + R_DrawTextureChains_TextureOnly (model, ent, chain); + glColor3f(1,1,1); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + } +#endif glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable (GL_BLEND); glDepthMask (GL_TRUE); @@ -1239,24 +1247,32 @@ void R_DrawTextureChains (qmodel_t *model, entity_t *ent, texchain_t chain) //to make fog work with multipass lightmapping, need to do one pass //with no fog, one modulate pass with black fog, and one additive //pass with black geometry and normal fog +#ifndef VITA Fog_DisableGFog (); +#endif R_DrawTextureChains_TextureOnly (model, ent, chain); +#ifndef VITA Fog_EnableGFog (); +#endif glDepthMask (GL_FALSE); glEnable (GL_BLEND); glBlendFunc(GL_ZERO, GL_SRC_COLOR); //modulate +#ifndef VITA Fog_StartAdditive (); +#endif R_DrawLightmapChains (); +#ifndef VITA Fog_StopAdditive (); - //if (Fog_GetDensity() > 0) - //{ - //glBlendFunc(GL_ONE, GL_ONE); //add - //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); - //glColor3f(0,0,0); - //R_DrawTextureChains_TextureOnly (model, ent, chain); - //glColor3f(1,1,1); - //glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); - //} + if (Fog_GetDensity() > 0) + { + glBlendFunc(GL_ONE, GL_ONE); //add + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); + glColor3f(0,0,0); + R_DrawTextureChains_TextureOnly (model, ent, chain); + glColor3f(1,1,1); + glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); + } +#endif glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glDisable (GL_BLEND); glDepthMask (GL_TRUE); @@ -1273,9 +1289,13 @@ fullbrights: glBlendFunc (GL_ONE, GL_ONE); glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE); glColor3f (entalpha, entalpha, entalpha); +#ifndef VITA Fog_StartAdditive (); +#endif R_DrawTextureChains_Glow (model, ent, chain); +#ifndef VITA Fog_StopAdditive (); +#endif glColor3f (1, 1, 1); glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE); glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); From 3ed7498b8587707c41b27141e0a46f265d025f99 Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Sun, 26 Feb 2023 18:27:20 -0500 Subject: [PATCH 3/6] Update Makefile.vita --- Makefile.vita | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.vita b/Makefile.vita index c084f39..de1cd21 100644 --- a/Makefile.vita +++ b/Makefile.vita @@ -268,7 +268,7 @@ nzp.vpk: nzp.velf mv nzp.elf build/vita/ mv nzp.elf.unstripped.elf build/vita/ mv nzp.velf build/vita/ - #mv source/*.o build/vita/ + mv source/*.o build/vita/ %.velf: %.elf cp $< $<.unstripped.elf From aff753308bf27629f66b7bd52e61e48749d5b7e7 Mon Sep 17 00:00:00 2001 From: Ian Date: Mon, 27 Feb 2023 10:37:55 -0500 Subject: [PATCH 4/6] NX/VITA: Fix bprint not reading OFS_PARM0 --- source/pr_cmds.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/source/pr_cmds.c b/source/pr_cmds.c index 0b2a62b..bf4a196 100644 --- a/source/pr_cmds.c +++ b/source/pr_cmds.c @@ -312,17 +312,15 @@ static void PF_setmodel (void) /* ================= PF_bprint - broadcast print to everyone on server - -bprint(value) +bprint(style, value) ================= */ -static void PF_bprint (void) +void PF_bprint (void) { - char *s; - - s = PF_VarString(0); + // + float style = G_FLOAT(OFS_PARM0); + char *s = PF_VarString(1); SV_BroadcastPrintf ("%s", s); } From da466434eb743189c05c6afc39b19c7778cf3aad Mon Sep 17 00:00:00 2001 From: Tyler Young Date: Thu, 2 Mar 2023 15:32:37 -0500 Subject: [PATCH 5/6] [CLIENT] Fix bug with Custom Maps Menu --- source/menu.c | 118 +++++++++++++++++++++++++++----------------------- 1 file changed, 64 insertions(+), 54 deletions(-) diff --git a/source/menu.c b/source/menu.c index f05e157..80d17b3 100644 --- a/source/menu.c +++ b/source/menu.c @@ -1699,6 +1699,7 @@ void Map_Finder(void) DIR* dir; struct dirent* ent; char map_dir[MAX_OSPATH]; + qboolean breakaway; for (int i = 0; i < 50; i++) { custom_maps[i].occupied = false; @@ -1716,87 +1717,96 @@ void Map_Finder(void) { if(!strcmp(COM_FileGetExtension(ent->d_name),"bsp") || !strcmp(COM_FileGetExtension(ent->d_name),"BSP")) { - qboolean breakaway = false; + breakaway = false; char ntype[32]; COM_StripExtension(ent->d_name, ntype, sizeof(ntype)); for (int j = 0; j < BASE_MAP_COUNT; j++) { if (breakaway == true) - return; + break; if(!strcmp(ntype, base_maps[j])) + { + //Con_Printf("ntype: %s\n base_map: %s\n", ntype, base_maps[j]); breakaway = true; + } } if (breakaway == true) + { + //Con_Printf("Breaking away at ntype: %s\n", ntype); continue; + } + else + { + //Con_Printf("Success at ntype: %s\n", ntype); + custom_maps[user_maps_num].occupied = true; + custom_maps[user_maps_num].map_name = malloc(sizeof(char)*32); + sprintf(custom_maps[user_maps_num].map_name, "%s", ntype); - custom_maps[user_maps_num].occupied = true; - custom_maps[user_maps_num].map_name = malloc(sizeof(char)*32); - sprintf(custom_maps[user_maps_num].map_name, "%s", ntype); + char* setting_path; + FILE* setting_file; - char* setting_path; - FILE* setting_file; + setting_path = malloc(sizeof(char)*64); + custom_maps[user_maps_num].map_thumbnail_path = malloc(sizeof(char)*64); - setting_path = malloc(sizeof(char)*64); - custom_maps[user_maps_num].map_thumbnail_path = malloc(sizeof(char)*64); + strcpy(setting_path, map_dir); + strcat(setting_path, "/"); - strcpy(setting_path, map_dir); - strcat(setting_path, "/"); + strcpy(custom_maps[user_maps_num].map_thumbnail_path, "gfx/menu/custom/"); + strcat(setting_path, custom_maps[user_maps_num].map_name); + strcat(custom_maps[user_maps_num].map_thumbnail_path, custom_maps[user_maps_num].map_name); + strcat(custom_maps[user_maps_num].map_thumbnail_path, ".tga"); + strcat(setting_path, ".txt"); - strcpy(custom_maps[user_maps_num].map_thumbnail_path, "gfx/menu/custom/"); - strcat(setting_path, custom_maps[user_maps_num].map_name); - strcat(custom_maps[user_maps_num].map_thumbnail_path, custom_maps[user_maps_num].map_name); - strcat(custom_maps[user_maps_num].map_thumbnail_path, ".tga"); - strcat(setting_path, ".txt"); + setting_file = fopen(setting_path, "r"); - setting_file = fopen(setting_path, "r"); + if (setting_file != NULL) { + int state; + state = 0; + int value; - if (setting_file != NULL) { - int state; - state = 0; - int value; + custom_maps[user_maps_num].map_name_pretty = malloc(sizeof(char)*32); + custom_maps[user_maps_num].map_desc_1 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_2 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_3 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_4 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_5 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_6 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_7 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_desc_8 = malloc(sizeof(char)*40); + custom_maps[user_maps_num].map_author = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_name_pretty = malloc(sizeof(char)*32); - custom_maps[user_maps_num].map_desc_1 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_2 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_3 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_4 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_5 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_6 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_7 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_desc_8 = malloc(sizeof(char)*40); - custom_maps[user_maps_num].map_author = malloc(sizeof(char)*40); + char buffer[64]; + int bufferlen = sizeof(buffer); - char buffer[64]; - int bufferlen = sizeof(buffer); + while(fgets(buffer, bufferlen, setting_file)) { + // strip newlines + buffer[strcspn(buffer, "\r")] = 0; + buffer[strcspn(buffer, "\n")] = 0; - while(fgets(buffer, bufferlen, setting_file)) { - // strip newlines - buffer[strcspn(buffer, "\r")] = 0; - buffer[strcspn(buffer, "\n")] = 0; - - switch(state) { - case 0: strcpy(custom_maps[user_maps_num].map_name_pretty, buffer); break; - case 1: strcpy(custom_maps[user_maps_num].map_desc_1, buffer); break; - case 2: strcpy(custom_maps[user_maps_num].map_desc_2, buffer); break; - case 3: strcpy(custom_maps[user_maps_num].map_desc_3, buffer); break; - case 4: strcpy(custom_maps[user_maps_num].map_desc_4, buffer); break; - case 5: strcpy(custom_maps[user_maps_num].map_desc_5, buffer); break; - case 6: strcpy(custom_maps[user_maps_num].map_desc_6, buffer); break; - case 7: strcpy(custom_maps[user_maps_num].map_desc_7, buffer); break; - case 8: strcpy(custom_maps[user_maps_num].map_desc_8, buffer); break; - case 9: strcpy(custom_maps[user_maps_num].map_author, buffer); break; - case 10: value = 0; sscanf(buffer, "%d", &value); custom_maps[user_maps_num].map_use_thumbnail = value; break; - case 11: value = 0; sscanf(buffer, "%d", &value); custom_maps[user_maps_num].map_allow_game_settings = value; break; - default: break; + switch(state) { + case 0: strcpy(custom_maps[user_maps_num].map_name_pretty, buffer); break; + case 1: strcpy(custom_maps[user_maps_num].map_desc_1, buffer); break; + case 2: strcpy(custom_maps[user_maps_num].map_desc_2, buffer); break; + case 3: strcpy(custom_maps[user_maps_num].map_desc_3, buffer); break; + case 4: strcpy(custom_maps[user_maps_num].map_desc_4, buffer); break; + case 5: strcpy(custom_maps[user_maps_num].map_desc_5, buffer); break; + case 6: strcpy(custom_maps[user_maps_num].map_desc_6, buffer); break; + case 7: strcpy(custom_maps[user_maps_num].map_desc_7, buffer); break; + case 8: strcpy(custom_maps[user_maps_num].map_desc_8, buffer); break; + case 9: strcpy(custom_maps[user_maps_num].map_author, buffer); break; + case 10: value = 0; sscanf(buffer, "%d", &value); custom_maps[user_maps_num].map_use_thumbnail = value; break; + case 11: value = 0; sscanf(buffer, "%d", &value); custom_maps[user_maps_num].map_allow_game_settings = value; break; + default: break; + } + state++; } - state++; - } fclose(setting_file); } user_maps_num = user_maps_num + 1; + } } } closedir(dir); From 63c767b55a839dd22933a4acc378fdba127c29e6 Mon Sep 17 00:00:00 2001 From: Ian Date: Thu, 9 Mar 2023 14:33:52 -0500 Subject: [PATCH 6/6] NX/VITA: Re-Enable Weapon Kicking with Deadshot Daiquiri --- source/cl_parse.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/source/cl_parse.c b/source/cl_parse.c index 70e1d12..0b47135 100644 --- a/source/cl_parse.c +++ b/source/cl_parse.c @@ -1183,12 +1183,10 @@ void CL_ParseWeaponFire (void) kick[0] = MSG_ReadCoord (cl.protocolflags)/5; kick[1] = MSG_ReadCoord (cl.protocolflags)/5; kick[2] = MSG_ReadCoord (cl.protocolflags)/5; - - if (!(cl.perks & 64)) { - cl.gun_kick[0] += kick[0]; - cl.gun_kick[1] += kick[1]; - cl.gun_kick[2] += kick[2]; - } + + cl.gun_kick[0] += kick[0]; + cl.gun_kick[1] += kick[1]; + cl.gun_kick[2] += kick[2]; } /* ===================