From d969d06a59af220d2551a1a3893b8d47b6db6254 Mon Sep 17 00:00:00 2001 From: zicodxx Date: Tue, 12 Apr 2011 12:17:20 +0200 Subject: [PATCH] kconfig weapon cycling fields changed after 0.56 release will automatically fix if version number changes on next release --- CHANGELOG.txt | 2 +- main/playsave.c | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index a0b41c8e6..9a63a619d 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -4,7 +4,7 @@ D1X-Rebirth Changelog -------- main/gauges.c, main/multi.h, main/net_udp.c, main/net_udp.h: Little fix for typing-indicator in multiplayer - was showing comma even if no player name was displayed; Removed team_vector from UDP lite_info structure - it's not needed; Increased UDP_NETGAMES_PAGES to actually show 3000 possible games include/gr.h, main/bm.c, main/bm.h, main/gamesave.c, main/lighting.c, main/multi.c, main/object.c, main/object.h, main/piggy.c, main/render.c, main/state.c: Execute set_dynamic_light 60 times per second max since more would just be a waste of CPU time; When executing set_dynamic_light, process ALL lights; Instead of storing light color in objects, do it on-thy-fly but store bitmap-based color in grs_bitmap - vastly speeds up colored dynamic lights; Improved saturation for vertex lighting to make light color a bit more subtile - +main/playsave.c: kconfig weapon cycling fields changed after 0.56 release will automatically fix if version number changes on next release 20110411 -------- diff --git a/main/playsave.c b/main/playsave.c index f3243ba55..5ff952111 100644 --- a/main/playsave.c +++ b/main/playsave.c @@ -313,6 +313,33 @@ int read_player_d1x(char *filename) strupr(word); } } + else if (strstr(word,"PLX VERSION")) // know the version this pilot was used last with - allow modifications + { + int v1=0,v2=0,v3=0; + d_free(word); + cfgets(line,50,f); + word=splitword(line,'='); + strupr(word); + while(!strstr(word,"END") && !PHYSFS_eof(f)) + { + sscanf(line,"%i.%i.%i",&v1,&v2,&v3); + d_free(word); + cfgets(line,50,f); + word=splitword(line,'='); + strupr(word); + } + if (v1 == 0 && v2 == 56 && v3 == 0) // was 0.56.0 + if (D1XMAJORi != v1 || D1XMINORi != v2 || D1XMICROi != v3) // newer (presumably) + { + // reset mouse cycling fields + PlayerCfg.KeySettings[1][44] = 255; + PlayerCfg.KeySettings[1][45] = 255; + PlayerCfg.KeySettings[1][46] = 255; + PlayerCfg.KeySettings[1][47] = 255; + PlayerCfg.KeySettings[2][28] = 255; + PlayerCfg.KeySettings[2][29] = 255; + } + } else if (strstr(word,"END") || PHYSFS_eof(f)) { Stop=1;