I'm not sure if I totally understand your problem, but what I get is that you want to read in this "defaultctf" keyvalue from the worldspawn entity, and if it's not there then just set the corresponding variable (in this case, a cvar) to zero. I don't follow what you say after that, but I don't see why a solution along these lines (semi-pseudocode here) won't work:
Entity :: KeyValues( blah ) { CVAR_SET_FLOAT( "oz_defaultctf", 0 ); if( keyvalue is "defaultctf" ) { CVAR_SET_FLOAT( "oz_defaultctf", value ); } } If this is correct, the oz_defaultctf cvar will be 0 unless it detects the defaultctf keyvalue in which case it sets the cvar to be the value read from worldspawn. I didn't really understand what the rest of your original message was about, so maybe I'm way off track. - Varlock ----- Original Message ----- From: "Dave R. Meyers" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Sunday, December 30, 2001 1:38 AM Subject: Re: [hlcoders] world.cpp Keyvalues > Also in regards to my last post, I have worked out an interim solution, but > I do not like it. > > if ( !strncmp( ( char * )STRING( gpGlobals->mapname ), "oz_ctf", 6 ) == 0 > && !strncmp( ( char * )STRING( gpGlobals->mapname ), "op4ctf_", 7 ) == 0) > CVAR_SET_STRING( "oz_defaultctf", "0" ); > > this seems to work great, but the problem is, I want to use some maps, that > do not have those as prefixes, and I do not want to add every map name to > the list. > > Dave R. Meyers > aka Starbreaker > www.starbraker.com > Lead Coder Oz Deathmatch > > _______________________________________________ > To unsubscribe, edit your list preferences, or view the list archives, please visit: > http://list.valvesoftware.com/mailman/listinfo/hlcoders > _______________________________________________ To unsubscribe, edit your list preferences, or view the list archives, please visit: http://list.valvesoftware.com/mailman/listinfo/hlcoders