PC version 1.08 stable
I am have a code:
override void OnRPC( PlayerIdentity sender, Object target, int rpc_type, ref ParamsReadContext ctx ) { #ifdef EXPANSIONEXPRINT EXPrint("ExpansionGlobalChatModule::OnRPC - Start"); #endif switch ( rpc_type ) { case ExpansionGlobalChatRPC.AddChatMessage: AddChatMessage( ctx, sender, target ); break; } #ifdef EXPANSIONEXPRINT EXPrint("ExpansionGlobalChatModule::OnRPC - End"); #endif }
How add a my function with my mod to this structure with work ref ParamsReadContext ctx ?
I am try add ths:
override void OnRPC( PlayerIdentity sender, Object target, int rpc_type, ref ParamsReadContext ctx ) { super.OnRPC(sender,target,rpc_type,ctx); MyFunction(ctx); }
but reading ref ParamsReadContext ctx in MyFunction don't worked. How do work this withour replasing all original code function and work my custom code?