Combat code, some scripting, broken network, and fixed some bugs.

This was SVN commit r1301.
This commit is contained in:
MarkT
2004-11-11 07:09:32 +00:00
parent 9b47d446d2
commit 793794649f
55 changed files with 1836 additions and 533 deletions
+3 -2
View File
@@ -69,13 +69,14 @@ bool CScriptObject::Run( JSObject* Context )
return( g_ScriptingHost.ValueToBool( Temp ) );
}
// Treat this as an event handler and dispatch an event to it.
void CScriptObject::DispatchEvent( JSObject* Context, CScriptEvent* evt )
// Treat this as an event handler and dispatch an event to it. Return !evt->m_cancelled, as a convenience.
bool CScriptObject::DispatchEvent( JSObject* Context, CScriptEvent* evt )
{
jsval Temp;
jsval EventObject = OBJECT_TO_JSVAL( evt->GetScript() );
if( Function )
JS_CallFunction( g_ScriptingHost.GetContext(), Context, Function, 1, &EventObject, &Temp );
return( !evt->m_Cancelled );
}
void CScriptObject::Compile( CStrW FileNameTag, CStrW FunctionBody )