Fox, on 31 January 2014 - 01:44 PM, said:
Userdef is global. Go to the EDuke32 source and jump to the definition of 'ud'.
user_defs ud;
Jumping to the definition of the 'user_defs' type then,
typedef struct {
#if !defined LUNATIC
vec3_t camerapos;
#endif
int32_t const_visibility,uw_framerate;
(...)
struct {
int32_t UseJoystick;
(...)
int32_t useprecache;
} config;
(...)
char show_level_text;
} user_defs;
There's nowhere an array of length MAXPLAYERS to be seen. Userdefs is just that: a container for various settings for the local player. As noted earlier, it throws together unrelated stuff and could have been organized better.
Quote
Arguably, the current behavior is too strict. For example, you can't read ud.level_number or ud.volume_number then, even though they're always identical on all peers and can be obtained with LEVEL and VOLUME without restriction.
I can revert the check in LunaCON and make it always accessible like before. The strict behavior would then be enabled with something like -Werror-nonlocal-userdef.
Quote
You can go with just "getuserdef .xxx". The space is important.

Help
Duke4.net
DNF #1
Duke 3D #1


