From: Anders R. <ma...@us...> - 2006-03-22 22:18:24
|
Update of /cvsroot/planeshift/planeshift/src/client In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15469/src/client Modified Files: modehandler.cpp Log Message: - Created individual values for downfall fog and fog density in the server sector info struct. This to allow to preserv fog density through downfalls. - Added selection of the maximum fog density from fog and downfall when sending weather messages to client. - Changed so that client will fade from current value not null when fading in. Index: modehandler.cpp =================================================================== RCS file: /cvsroot/planeshift/planeshift/src/client/modehandler.cpp,v retrieving revision 1.182 retrieving revision 1.183 diff -C2 -d -r1.182 -r1.183 *** modehandler.cpp 22 Mar 2006 21:35:26 -0000 1.182 --- modehandler.cpp 22 Mar 2006 22:18:20 -0000 1.183 *************** *** 464,468 **** wi->downfall_params.fade_value = 0; wi->downfall_params.fade_time = 0; ! wi->fog_params = wi->downfall_params; wi->fog_condition = WEATHER_CLEAR; wi->fog = NULL; --- 464,468 ---- wi->downfall_params.fade_value = 0; wi->downfall_params.fade_time = 0; ! wi->fog_params = wi->downfall_params; // Fog and downfall use same type wi->fog_condition = WEATHER_CLEAR; wi->fog = NULL; *************** *** 1008,1013 **** if(info.fog_fade) { ! wi->fog_params.fade_time = info.fog_fade; ! wi->fog_params.value = 0; wi->fog_params.fade_value = info.fog_density; } --- 1008,1012 ---- if(info.fog_fade) { ! wi->fog_params.fade_time = info.fog_fade; wi->fog_params.fade_value = info.fog_density; } *************** *** 1059,1071 **** ri->downfall_condition = (info.downfall_is_snow?WEATHER_SNOW:WEATHER_RAIN); ! ri->downfall_params.fade_time = info.downfall_fade; ! if (ri->downfall_params.fade_time) { ! ri->downfall_params.value = 0; ri->downfall_params.fade_value = info.downfall_drops; } else { ! ri->downfall_params.fade_value = ri->downfall_params.value = info.downfall_drops; } } --- 1058,1071 ---- ri->downfall_condition = (info.downfall_is_snow?WEATHER_SNOW:WEATHER_RAIN); ! ! if (info.downfall_fade) { ! ri->downfall_params.fade_time = info.downfall_fade; ri->downfall_params.fade_value = info.downfall_drops; } else { ! ri->downfall_params.fade_time = 0; ! ri->downfall_params.value = ri->downfall_params.fade_value = info.downfall_drops; } } |