X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。
| Revision | 181 (tree) |
|---|---|
| Time | 2017-07-17 01:34:21 |
| Author | |
小物の破壊判定の仕様修正、コンソールのコマンドを3個追加(delhuman・delweapon・delobj)
| @@ -165,8 +165,9 @@ | ||
| 165 | 165 | |
| 166 | 166 | case 15: //小物破壊待ち |
| 167 | 167 | tsmallobject = ObjMgr->SearchSmallobject(data.p2); |
| 168 | - if( tsmallobject == NULL ){ return cnt; } | |
| 169 | - if( tsmallobject->GetEnableFlag() == true ){ return cnt; } | |
| 168 | + if( tsmallobject != NULL ){ | |
| 169 | + if( tsmallobject->GetEnableFlag() == true ){ return cnt; } | |
| 170 | + } | |
| 170 | 171 | nextp4 = data.p3; |
| 171 | 172 | break; |
| 172 | 173 |
| @@ -2864,14 +2864,14 @@ | ||
| 2864 | 2864 | |
| 2865 | 2865 | //コマンドリスト |
| 2866 | 2866 | if( strcmp(NewCommand, "help") == 0 ){ |
| 2867 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "help human result event ver"); | |
| 2868 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "mif bd1 pd1"); | |
| 2869 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "info view center map aiinfo <NUM>"); | |
| 2870 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "tag radar inmap sky <NUM> dark"); | |
| 2871 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "ff revive kill <NUM> treat <NUM> nodamage <NUM>"); | |
| 2872 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "break <NUM> newobj <NUM>"); | |
| 2873 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "bot nofight caution stop estop speed"); | |
| 2874 | - AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "window ss clear exit"); | |
| 2867 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "help human result event ver"); | |
| 2868 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "mif bd1 pd1"); | |
| 2869 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "info view center map aiinfo <NUM>"); | |
| 2870 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "tag radar inmap sky <NUM> dark"); | |
| 2871 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "ff revive kill <NUM> treat <NUM> nodamage <NUM>"); | |
| 2872 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "newobj <NUM> break <NUM> delhuman <NUM> delweapon <NUM> delobj <NUL>"); | |
| 2873 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "bot nofight caution stop estop speed"); | |
| 2874 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), "window ss clear exit"); | |
| 2875 | 2875 | } |
| 2876 | 2876 | |
| 2877 | 2877 | //人の統計情報 |
| @@ -3360,6 +3360,17 @@ | ||
| 3360 | 3360 | } |
| 3361 | 3361 | } |
| 3362 | 3362 | |
| 3363 | + //小物を新規配置 | |
| 3364 | + if( GetCommandNum("newobj", &id) == true ){ | |
| 3365 | + if( (0 <= id)&&(id < TOTAL_PARAMETERINFO_SMALLOBJECT) ){ | |
| 3366 | + int dataid = ObjMgr.AddSmallObjectIndex(camera_x + cos(camera_rx)*20.0f, camera_y, camera_z + sin(camera_rx)*20.0f, camera_rx*-1, id, true); | |
| 3367 | + if( dataid != -1 ){ | |
| 3368 | + sprintf(str, "Add SmallObject[%d].", dataid); | |
| 3369 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); | |
| 3370 | + } | |
| 3371 | + } | |
| 3372 | + } | |
| 3373 | + | |
| 3363 | 3374 | //小物を破壊 |
| 3364 | 3375 | if( GetCommandNum("break", &id) == true ){ |
| 3365 | 3376 | if( (0 <= id)&&(id < MAX_SMALLOBJECT) ){ |
| @@ -3372,17 +3383,72 @@ | ||
| 3372 | 3383 | } |
| 3373 | 3384 | } |
| 3374 | 3385 | |
| 3375 | - //小物を新規配置 | |
| 3376 | - if( GetCommandNum("newobj", &id) == true ){ | |
| 3377 | - if( (0 <= id)&&(id < TOTAL_PARAMETERINFO_SMALLOBJECT) ){ | |
| 3378 | - int dataid = ObjMgr.AddSmallObjectIndex(camera_x + cos(camera_rx)*20.0f, camera_y, camera_z + sin(camera_rx)*20.0f, camera_rx*-1, id, true); | |
| 3379 | - if( dataid != -1 ){ | |
| 3380 | - sprintf(str, "Add SmallObject[%d].", dataid); | |
| 3386 | + //人を削除 | |
| 3387 | + if( GetCommandNum("delhuman", &id) == true ){ | |
| 3388 | + if( (0 <= id)&&(id < MAX_HUMAN) ){ | |
| 3389 | + human *thuman = ObjMgr.GeHumanObject(id); | |
| 3390 | + if( thuman->GetEnableFlag() == true ){ | |
| 3391 | + | |
| 3392 | + //人が持っている武器もすべて無効にする | |
| 3393 | + int dummy; | |
| 3394 | + class weapon *weaponlist[TOTAL_HAVEWEAPON]; | |
| 3395 | + thuman->GetWeapon(&dummy, weaponlist); | |
| 3396 | + for(int i=0; i<TOTAL_HAVEWEAPON; i++){ | |
| 3397 | + if( weaponlist[i] != NULL ){ | |
| 3398 | + weaponlist[i]->SetEnableFlag(false); | |
| 3399 | + weaponlist[i] = NULL; | |
| 3400 | + } | |
| 3401 | + } | |
| 3402 | + thuman->SetWeapon(weaponlist); | |
| 3403 | + | |
| 3404 | + thuman->SetEnableFlag(false); | |
| 3405 | + sprintf(str, "Delete human[%d].", id); | |
| 3381 | 3406 | AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); |
| 3382 | 3407 | } |
| 3383 | 3408 | } |
| 3384 | 3409 | } |
| 3385 | 3410 | |
| 3411 | + //武器を削除 | |
| 3412 | + if( GetCommandNum("delweapon", &id) == true ){ | |
| 3413 | + if( (0 <= id)&&(id < MAX_WEAPON) ){ | |
| 3414 | + weapon *tweapon = ObjMgr.GetWeaponObject(id); | |
| 3415 | + if( tweapon->GetEnableFlag() == true ){ | |
| 3416 | + | |
| 3417 | + //人がその武器を持っているなら、関連付けを外す(捨てさせる) | |
| 3418 | + int dummy; | |
| 3419 | + class weapon *weaponlist[TOTAL_HAVEWEAPON]; | |
| 3420 | + for(int i=0; i<MAX_HUMAN; i++){ | |
| 3421 | + human *thuman = ObjMgr.GeHumanObject(i); | |
| 3422 | + if( thuman->GetEnableFlag() == true ){ | |
| 3423 | + thuman->GetWeapon(&dummy, weaponlist); | |
| 3424 | + for(int j=0; j<TOTAL_HAVEWEAPON; j++){ | |
| 3425 | + if( weaponlist[j] == tweapon ){ | |
| 3426 | + weaponlist[j] = NULL; | |
| 3427 | + } | |
| 3428 | + } | |
| 3429 | + thuman->SetWeapon(weaponlist); | |
| 3430 | + } | |
| 3431 | + } | |
| 3432 | + | |
| 3433 | + tweapon->SetEnableFlag(false); | |
| 3434 | + sprintf(str, "Delete weapon[%d].", id); | |
| 3435 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); | |
| 3436 | + } | |
| 3437 | + } | |
| 3438 | + } | |
| 3439 | + | |
| 3440 | + //小物を削除 | |
| 3441 | + if( GetCommandNum("delobj", &id) == true ){ | |
| 3442 | + if( (0 <= id)&&(id < MAX_SMALLOBJECT) ){ | |
| 3443 | + smallobject *tsmallobject = ObjMgr.GetSmallObject(id); | |
| 3444 | + if( tsmallobject->GetEnableFlag() == true ){ | |
| 3445 | + tsmallobject->SetEnableFlag(false); | |
| 3446 | + sprintf(str, "Delete SmallObject[%d].", id); | |
| 3447 | + AddInfoConsole(d3dg->GetColorCode(1.0f,1.0f,1.0f,1.0f), str); | |
| 3448 | + } | |
| 3449 | + } | |
| 3450 | + } | |
| 3451 | + | |
| 3386 | 3452 | //FF(同士討ち)有効化 |
| 3387 | 3453 | if( strcmp(NewCommand, "ff") == 0 ){ |
| 3388 | 3454 | if( ObjMgr.GetFriendlyFireFlag() == false ){ |