kconfig weapon cycling fields changed after 0.56 release will automatically fix if version number changes on next release

This commit is contained in:
zicodxx 2011-04-12 12:17:20 +02:00
parent 6bb12ba926
commit d969d06a59
2 changed files with 28 additions and 1 deletions

View file

@ -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
--------

View file

@ -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;