![]() |
|
Mapping Mapping sizes Limits Entities Bugs & Work-a-rounds Notes Scripting reference Mapping - Tutorials Brushwork from blueprint Tools Brush generator Vehicle generator MD3 Tag The Dummy Modding Project: Bug Fix Project: Crockett Other stuff Forum Server Info Colors Voice Chats Scripts Links |
Project: Bug FixThe objectiveThe goal of this project is to provide modders in the ET community with a SDK code base that contains fixes for various bugs which are present in the stock etmain game (version 2.60).26th september 2006: Sadly bugfix 088 had a bug :-( There were 3 lines that should have been deleted for the fix to work correctly. Show index Previous bug: Centerprint messages looses the coloration when printing multiple lines Next bug: Serverlist wraps Bugfix 083 - Improving script error messagesProblem:Several of the scripting errors messages could be more informative.Solution:When possible print the name of the offending entity.2.56 & 2.60 Code
g_mover.c @ 5239
target = G_FindByTargetname( NULL, debris->target );
if(!target) {
// CHRUKER: b083 - Improving script error messages
G_Error( "ERROR: func_debris with no target (%s)", debris->target );
}
speed = debris->velocity[0];
g_script_actions.c @ 122
tent = G_Find( NULL, FOFS(message), spawnname );
if(!tent) {
// CHRUKER: b083 - Improving script error messages
G_Error( "G_Scripting: setautospawn, couldn't find target (%s)\n", spawnname );
}
if( !tent->count ) {
g_script_actions.c @ 2822
sysmsg = G_GetSysMessageNumber( token );
if(sysmsg == -1) {
// CHRUKER: b083 - Improving script error messages
G_Error( "G_ScriptAction_VoiceAnnounce: invalid system message (%s)\n", token );
}
G_SendSystemMessage( sysmsg, !num ? TEAM_AXIS : TEAM_ALLIES );
g_script_actions.c @ 3241
token = COM_ParseExt( &pString, qfalse );
Q_strncpyz( state, token, sizeof(state) );
if (!state[0]) {
// CHRUKER: b083 - Improving script error messages
G_Error( "G_Scripting: setstate (%s) must have a name and an state\n", name );
}
if( !Q_stricmp( state, "default" ) ) {
entState = STATE_DEFAULT;
} else if( !Q_stricmp( state, "invisible" ) ) {
entState = STATE_INVISIBLE;
} else if( !Q_stricmp( state, "underconstruction" ) ) {
entState = STATE_UNDERCONSTRUCTION;
} else {
// CHRUKER: b083 - Improving script error messages
G_Error( "G_Scripting: setstate (%s) with invalid state '%s'\n", name, state );
}
// look for an entities
target = &g_entities[MAX_CLIENTS-1];
hash = BG_StringHashValue( name );
while( 1 ) {
target = G_FindByTargetnameFast( target, name, hash );
if( !target ) {
if( !found ) {
// CHRUKER: b083 - Improving script error messages
G_Printf( "^1Warning: setstate (%s) called and no entities found\n", name );
}
break;
}
Show index Previous bug: Centerprint messages looses the coloration when printing multiple lines Next bug: Serverlist wraps Color codingSample = New codeSample = Changed code (the new version is what is displayed) Sample = Deleted code |
©2007 Chruker |