| 186 | } |
| 187 | |
| 188 | void CWorldObjectsRobotDialog::OnCheckinRobot() { |
| 189 | #if 0 // LGT: undeclared symbols |
| 190 | int n=D3EditState.current_robot; |
| 191 | mngs_Pagelock temp_pl; |
| 192 | int r; |
| 193 | |
| 194 | if (Num_robots<1) |
| 195 | return; |
| 196 | |
| 197 | if (!mng_MakeLocker()) |
| 198 | { |
| 199 | OutrageMessageBox ("Either you have no network support, or someone else has exclusive access to the table files (retry in a 5 seconds)"); |
| 200 | return; |
| 201 | } |
| 202 | |
| 203 | |
| 204 | // Make sure we own this robot |
| 205 | strcpy (temp_pl.name,Robots[n].name); |
| 206 | temp_pl.pagetype=PAGETYPE_ROBOT; |
| 207 | |
| 208 | r=mng_CheckIfPageOwned (&temp_pl,TableUser); |
| 209 | if (r<0) |
| 210 | OutrageMessageBox (ErrorString); |
| 211 | else if (r==0) |
| 212 | OutrageMessageBox (InfoString); |
| 213 | else |
| 214 | { |
| 215 | // Change the pagelock state to UNLOCKED |
| 216 | strcpy (temp_pl.holder,"UNLOCKED"); |
| 217 | if (!mng_ReplacePagelock (temp_pl.name,&temp_pl)) |
| 218 | { |
| 219 | MessageBox (ErrorString,"Error!"); |
| 220 | mng_EraseLocker(); |
| 221 | return; |
| 222 | } |
| 223 | else |
| 224 | { |
| 225 | // Now actually replace the copy on the net with our local one |
| 226 | |
| 227 | if (!mng_ReplaceRobotPage (Robots[n].name,n,0)) |
| 228 | OutrageMessageBox (ErrorString); |
| 229 | else |
| 230 | { |
| 231 | // Save this robot anim/model to the network for all |
| 232 | |
| 233 | char destname[100],srcname[100]; |
| 234 | |
| 235 | sprintf (srcname,"%s\\%s",LocalModelsDir,Poly_models[Robots[n].render_handle].name); |
| 236 | sprintf (destname,"%s\\%s",NetModelsDir,Poly_models[Robots[n].render_handle].name); |
| 237 | |
| 238 | cf_CopyFile (destname,srcname); |
| 239 | |
| 240 | OutrageMessageBox ("Robot checked in."); |
| 241 | |
| 242 | // Delete it from local pagefile if its there |
| 243 | int dret=mng_DeleteRobotPage (Robots[n].name,1); |
| 244 | ASSERT (dret==1); |
| 245 | mng_EraseLocker(); |
nothing calls this directly
no test coverage detected