| 1115 | } |
| 1116 | |
| 1117 | int CScriptRMI::SynchedNewIndexFunction(IFunctionHandler* pH) |
| 1118 | { |
| 1119 | if (!m_pThis->m_pParent) |
| 1120 | { |
| 1121 | pH->GetIScriptSystem()->RaiseError("Trying to set a synchronized variable with no game started... failing"); |
| 1122 | return pH->EndFunction(); |
| 1123 | } |
| 1124 | |
| 1125 | SmartScriptTable table; |
| 1126 | SmartScriptTable hidden; |
| 1127 | const char* key; |
| 1128 | ScriptAnyValue value; |
| 1129 | |
| 1130 | if (!pH->GetParam(1, table)) |
| 1131 | return pH->EndFunction(false); |
| 1132 | |
| 1133 | ScriptHandle id; |
| 1134 | if (!table->GetValue(ID_FIELD, id)) |
| 1135 | return pH->EndFunction(false); |
| 1136 | if (!table->GetValue(HIDDEN_FIELD, hidden)) |
| 1137 | return pH->EndFunction(false); |
| 1138 | |
| 1139 | if (!pH->GetParam(2, key)) |
| 1140 | return pH->EndFunction(false); |
| 1141 | if (!pH->GetParamAny(3, value)) |
| 1142 | return pH->EndFunction(false); |
| 1143 | |
| 1144 | hidden->SetValueAny(key, value); |
| 1145 | |
| 1146 | m_pThis->m_pParent->ChangedScript((EntityId) id.n); |
| 1147 | |
| 1148 | return pH->EndFunction(true); |
| 1149 | } |
| 1150 | |
| 1151 | void CScriptRMI::GetMemoryStatistics(ICrySizer* s) |
| 1152 | { |
nothing calls this directly
no test coverage detected