• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

X operations(XOPS)に非常に近いFPSゲームを制作・リメイクし、成果物をオープンソースとして公開することを目的としたプロジェクトです。


Commit MetaInfo

Revision245 (tree)
Time2020-05-10 16:58:04
Authorxops-mikan

Log Message

ショットモード切り替え機能を武器ID切り替え機能に命名変更、キーコード用の定数名修正

Change Summary

Incremental Difference

--- trunk/ai.cpp (revision 244)
+++ trunk/ai.cpp (revision 245)
@@ -888,7 +888,7 @@
888888 weapon[notselectweapon]->GetParamData(NULL, NULL, &nbs);
889889 if( nbs > 0 ){
890890 //持ち替える
891- ObjMgr->ChangeWeapon(ctrlid);
891+ ObjMgr->ChangeHaveWeapon(ctrlid);
892892 return 1;
893893 }
894894 }
@@ -1027,7 +1027,7 @@
10271027 if( longattack == false ){
10281028 // 1/100の確率で持ち替える
10291029 if( (GetRand(100) == 0)&&(nextnds > 0) ){
1030- ObjMgr->ChangeWeapon(ctrlid);
1030+ ObjMgr->ChangeHaveWeapon(ctrlid);
10311031 return 3;
10321032 }
10331033 }
@@ -1034,7 +1034,7 @@
10341034 else{
10351035 // 1/66の確率で持ち替える
10361036 if( (GetRand(66) == 0)&&(nextnds > 0) ){
1037- ObjMgr->ChangeWeapon(ctrlid);
1037+ ObjMgr->ChangeHaveWeapon(ctrlid);
10381038 return 3;
10391039 }
10401040 }
@@ -1088,7 +1088,7 @@
10881088 return 2;
10891089 }
10901090 //else{
1091- ObjMgr->ChangeWeapon(ctrlid);
1091+ ObjMgr->ChangeHaveWeapon(ctrlid);
10921092 return 3;
10931093 //}
10941094 }
@@ -1106,7 +1106,7 @@
11061106 if( longattack == false ){
11071107 //近距離攻撃中で、現在SEMI・切り替えるとFULLになるなら
11081108 if( (blazingmodeS == false)&&(blazingmodeN == true) ){
1109- ObjMgr->ChangeShotMode(ctrlid); //切り替える
1109+ ObjMgr->ChangeWeaponID(ctrlid); //切り替える
11101110 return 4;
11111111 }
11121112 }
@@ -1113,7 +1113,7 @@
11131113 else{
11141114 //遠距離攻撃中で、現在FULL・切り替えるとSEMIになるなら
11151115 if( (blazingmodeS == true)&&(blazingmodeN == false) ){
1116- ObjMgr->ChangeShotMode(ctrlid); //切り替える
1116+ ObjMgr->ChangeWeaponID(ctrlid); //切り替える
11171117 return 4;
11181118 }
11191119 }
@@ -1151,7 +1151,7 @@
11511151
11521152 //手榴弾に切り替えられるなら、切り替える
11531153 if( (i != TOTAL_HAVEWEAPON)&&(i != selectweapon) ){
1154- ObjMgr->ChangeWeapon(ctrlid, i);
1154+ ObjMgr->ChangeHaveWeapon(ctrlid, i);
11551155 }
11561156
11571157 //パスと人の高さを取得
--- trunk/config.cpp (revision 244)
+++ trunk/config.cpp (revision 245)
@@ -231,11 +231,11 @@
231231 Keycode[KEY_RELOAD] = 49;
232232 Keycode[KEY_DROPWEAPON] = 38;
233233 Keycode[KEY_ZOOMSCOPE] = 20;
234- Keycode[KEY_ShotMODE] = 55;
234+ Keycode[KEY_SHOTMODE] = 55;
235235 Keycode[KEY_SWITCHWEAPON] = 57;
236236 Keycode[KEY_WEAPON1] = 23;
237237 Keycode[KEY_WEAPON2] = 24;
238- Keycode[KEY_Shot] = 18;
238+ Keycode[KEY_SHOT] = 18;
239239 MouseSensitivity = 25;
240240 FullscreenFlag = true;
241241 SoundFlag = true;
--- trunk/config.h (revision 244)
+++ trunk/config.h (revision 245)
@@ -55,11 +55,11 @@
5555 KEY_RELOAD,
5656 KEY_DROPWEAPON,
5757 KEY_ZOOMSCOPE,
58- KEY_ShotMODE,
58+ KEY_SHOTMODE,
5959 KEY_SWITCHWEAPON,
6060 KEY_WEAPON1,
6161 KEY_WEAPON2,
62- KEY_Shot
62+ KEY_SHOT
6363 };
6464
6565 //! @brief 設定ファイルを読み込むクラス
--- trunk/gamemain.cpp (revision 244)
+++ trunk/gamemain.cpp (revision 245)
@@ -2113,7 +2113,7 @@
21132113 }
21142114
21152115 //発砲操作かチェック
2116- if( CheckInputControl(KEY_Shot, keymode) ){
2116+ if( CheckInputControl(KEY_SHOT, keymode) ){
21172117
21182118 if( zombie == false ){
21192119 //弾の発射に成功すれば
@@ -2143,15 +2143,20 @@
21432143
21442144 //武器の切り替え操作かチェック
21452145 if( CheckInputControl(KEY_SWITCHWEAPON, 1) ){
2146- ObjMgr.ChangeWeapon(PlayerID, -1);
2146+ ObjMgr.ChangeHaveWeapon(PlayerID, -1);
21472147 }
21482148 if( CheckInputControl(KEY_WEAPON1, 1) ){
2149- ObjMgr.ChangeWeapon(PlayerID, 0);
2149+ ObjMgr.ChangeHaveWeapon(PlayerID, 0);
21502150 }
21512151 if( CheckInputControl(KEY_WEAPON2, 1) ){
2152- ObjMgr.ChangeWeapon(PlayerID, 1);
2152+ ObjMgr.ChangeHaveWeapon(PlayerID, 1);
21532153 }
21542154
2155+ //連射モード変更操作かチェック
2156+ if( CheckInputControl(KEY_SHOTMODE, 1) ){
2157+ ObjMgr.ChangeWeaponID(PlayerID);
2158+ }
2159+
21552160 //武器の廃棄操作かチェック
21562161 if( CheckInputControl(KEY_DROPWEAPON, 1) ){
21572162 ObjMgr.DumpWeapon(PlayerID);
@@ -2162,11 +2167,6 @@
21622167 ObjMgr.ChangeScopeMode(PlayerID);
21632168 }
21642169
2165- //連射モード変更操作かチェック
2166- if( CheckInputControl(KEY_ShotMODE, 1) ){
2167- ObjMgr.ChangeShotMode(PlayerID);
2168- }
2169-
21702170 //カメラ表示モード変更操作かチェック
21712171 if( inputCtrl->CheckKeyDown( GetFunctionKeycode(1) ) ){
21722172 if( Camera_F1mode == false ){
@@ -2322,7 +2322,7 @@
23222322 //人を追加
23232323 id = ObjMgr.AddHumanIndex(x, y, z, r, param, team, weapon_paramid);
23242324 if( id >= 0 ){
2325- ObjMgr.ChangeWeapon(id, selectweapon);
2325+ ObjMgr.ChangeHaveWeapon(id, selectweapon);
23262326
23272327 //AIを設定
23282328 HumanAI[id].Init();
@@ -2369,7 +2369,7 @@
23692369
23702370 //移動量決定
23712371 float dist = VIEW_FREECAMERA_SCALE;
2372- if( CheckInputControl(KEY_Shot, 0) ){
2372+ if( CheckInputControl(KEY_SHOT, 0) ){
23732373 dist *= 2;
23742374 }
23752375
@@ -2759,7 +2759,7 @@
27592759 }
27602760 }
27612761 reloadcnt = myHuman->GetWeaponReloadCnt();
2762- selectweaponcnt = myHuman->GetChangeWeaponCnt() + myHuman->GetChangeWeaponIDCnt();
2762+ selectweaponcnt = myHuman->GetChangeHaveWeaponCnt() + myHuman->GetChangeWeaponIDCnt();
27632763 GameParamInfo.GetWeapon(weapon_paramid[selectweapon], &weapon_paramdata);
27642764 //strcpy(weaponname, weapon_paramdata.name);
27652765 strcpy(str, weapon_paramdata.name);
--- trunk/object.cpp (revision 244)
+++ trunk/object.cpp (revision 245)
@@ -187,9 +187,9 @@
187187 }
188188 selectweapon = 1;
189189 selectweaponcnt = 0;
190+ changeweaponidcnt = 0;
190191 weaponshotcnt = 0;
191192 weaponreloadcnt = 0;
192- changeweaponidcnt = 0;
193193 //if( Param->GetHuman(id_param, &data) == 0 ){
194194 // hp = data.hp;
195195 //}
@@ -259,9 +259,9 @@
259259 }
260260 selectweapon = 1;
261261 selectweaponcnt = 0;
262+ changeweaponidcnt = 0;
262263 weaponshotcnt = 0;
263264 weaponreloadcnt = 0;
264- changeweaponidcnt = 0;
265265 if( Param->GetHuman(id_param, &data) == 0 ){
266266 hp = data.hp;
267267 }
@@ -429,7 +429,7 @@
429429 //! @brief 武器を切り替える(持ち替える)
430430 //! @param id 持ち替える武器 (-1 で次の武器)
431431 //! @attention ゲーム上から直接呼び出すことは避け、ObjectManagerクラスから呼び出してください。
432-void human::ChangeWeapon(int id)
432+void human::ChangeHaveWeapon(int id)
433433 {
434434 //体力がなければ失敗
435435 if( hp <= 0 ){ return; }
@@ -466,12 +466,12 @@
466466
467467 //腕の角度(反動)を設定
468468 if( nowweapon == NULL ){ //手ぶら
469- MotionCtrl->ChangeWeapon(ID_WEAPON_NONE);
469+ MotionCtrl->ChangeHaveWeapon(ID_WEAPON_NONE);
470470 }
471471 else{
472472 int id_param = 0;
473473 nowweapon->GetParamData(&id_param, NULL, NULL);
474- MotionCtrl->ChangeWeapon(id_param);
474+ MotionCtrl->ChangeHaveWeapon(id_param);
475475 }
476476
477477 //切り替え完了のカウント
@@ -480,19 +480,78 @@
480480
481481 //! @brief 武器の切り替えカウントを取得
482482 //! @return カウント数 (1以上で切り替え中)
483-int human::GetChangeWeaponCnt()
483+int human::GetChangeHaveWeaponCnt()
484484 {
485485 return selectweaponcnt;
486486 }
487487
488-//! @brief 武器のリロードカウントを取得
489-//! @return カウント数 (リロード中:1以上)
490-int human::GetWeaponReloadCnt()
488+//! @brief 武器の種類切り替え
489+//! @return 成功:0 失敗:1
490+//! @attention ゲーム上から直接呼び出すことは避け、ObjectManagerクラスから呼び出してください。
491+int human::ChangeWeaponID()
491492 {
492- return weaponreloadcnt;
493+ //武器切り替え中なら失敗
494+ //if( selectweaponcnt > 0 ){ return 1; }
495+ if( changeweaponidcnt > 0 ){ return 1; }
496+
497+ //武器を装備してなければ失敗
498+ if( weapon[selectweapon] == NULL ){ return 1; }
499+
500+ //装備している武器の情報を取得
501+ int param_id, lnbs, nbs;
502+ weapon[selectweapon]->GetParamData(&param_id, &lnbs, &nbs);
503+
504+ //武器の種類切り替え先(新しい武器番号)を調べる
505+ WeaponParameter ParamData;
506+ int ChangeWeaponID, ChangeCnt;
507+ if( Param->GetWeapon(param_id, &ParamData) != 0 ){ return 1; }
508+ ChangeWeaponID = ParamData.ChangeWeaponID;
509+ ChangeCnt = ParamData.ChangeWeaponCnt;
510+
511+ //新しい武器番号が正しいか確認
512+ if( ChangeWeaponID == param_id ){ return 1; }
513+ if( (ChangeWeaponID < 0)||(TOTAL_PARAMETERINFO_WEAPON-1 < ChangeWeaponID) ){ return 1; }
514+
515+ //カウントが有効にもかかわらずリロード中なら切り替えない
516+ if( (ChangeCnt > 0)&&(weaponreloadcnt > 0) ){ return 1; }
517+
518+ //設定を適用
519+ weapon[selectweapon]->SetParamData(ChangeWeaponID, lnbs, nbs, false);
520+
521+ //もしスコープ使用中ならば
522+ if( scopemode != 0 ){
523+ if( ChangeCnt == 0 ){
524+ //新しい武器の情報を取得
525+ if( Param->GetWeapon(ChangeWeaponID, &ParamData) != 0 ){ return 1; }
526+
527+ if( scopemode == ParamData.scopemode ){
528+ //同じスコープが使えるならば、何もせずスコープ維持
529+ }
530+ else if( ParamData.scopemode == 0 ){
531+ //スコープが使えないならば、スコープ解除
532+ SetDisableScope();
533+ }
534+ else{
535+ //異なるスコープが使えるならば、スコープ再設定
536+ SetEnableScope();
537+ }
538+ }
539+ else{
540+ //スコープ解除
541+ SetDisableScope();
542+ }
543+ }
544+
545+ //モーション実行
546+ MotionCtrl->ChangeWeaponID(ChangeWeaponID);
547+
548+ //切り替え完了のカウント
549+ changeweaponidcnt = ChangeCnt;
550+
551+ return 0;
493552 }
494553
495-//! @brief 武器の切り替えカウントを取得
554+//! @brief 武器の種類切り替えカウントを取得
496555 //! @return カウント数 (1以上で切り替え中)
497556 int human::GetChangeWeaponIDCnt()
498557 {
@@ -499,6 +558,13 @@
499558 return changeweaponidcnt;
500559 }
501560
561+//! @brief 武器のリロードカウントを取得
562+//! @return カウント数 (リロード中:1以上)
563+int human::GetWeaponReloadCnt()
564+{
565+ return weaponreloadcnt;
566+}
567+
502568 //! @brief 武器を取得
503569 //! @param out_selectweapon 選択されている武器 (0 〜 [TOTAL_HAVEWEAPON]-1)
504570 //! @param out_weapon 受け取るweaponクラスのポインタ配列 (配列数:TOTAL_HAVEWEAPON)
@@ -721,72 +787,6 @@
721787 return false;
722788 }
723789
724-//! @brief 武器のショットモード切り替え
725-//! @return 成功:0 失敗:1
726-//! @attention ゲーム上から直接呼び出すことは避け、ObjectManagerクラスから呼び出してください。
727-int human::ChangeShotMode()
728-{
729- //武器切り替え中なら失敗
730- //if( selectweaponcnt > 0 ){ return 1; }
731- if( changeweaponidcnt > 0 ){ return 1; }
732-
733- //武器を装備してなければ失敗
734- if( weapon[selectweapon] == NULL ){ return 1; }
735-
736- //装備している武器の情報を取得
737- int param_id, lnbs, nbs;
738- weapon[selectweapon]->GetParamData(&param_id, &lnbs, &nbs);
739-
740- //武器のショットモード切り替え先(新しい武器番号)を調べる
741- WeaponParameter ParamData;
742- int ChangeWeaponID, ChangeCnt;
743- if( Param->GetWeapon(param_id, &ParamData) != 0 ){ return 1; }
744- ChangeWeaponID = ParamData.ChangeWeaponID;
745- ChangeCnt = ParamData.ChangeWeaponCnt;
746-
747- //新しい武器番号が正しいか確認
748- if( ChangeWeaponID == param_id ){ return 1; }
749- if( (ChangeWeaponID < 0)||(TOTAL_PARAMETERINFO_WEAPON-1 < ChangeWeaponID) ){ return 1; }
750-
751- //カウントが有効にもかかわらずリロード中なら切り替えない
752- if( (ChangeCnt > 0)&&(weaponreloadcnt > 0) ){ return 1; }
753-
754- //設定を適用
755- weapon[selectweapon]->SetParamData(ChangeWeaponID, lnbs, nbs, false);
756-
757- //もしスコープ使用中ならば
758- if( scopemode != 0 ){
759- if( ChangeCnt == 0 ){
760- //新しい武器の情報を取得
761- if( Param->GetWeapon(ChangeWeaponID, &ParamData) != 0 ){ return 1; }
762-
763- if( scopemode == ParamData.scopemode ){
764- //同じスコープが使えるならば、何もせずスコープ維持
765- }
766- else if( ParamData.scopemode == 0 ){
767- //スコープが使えないならば、スコープ解除
768- SetDisableScope();
769- }
770- else{
771- //異なるスコープが使えるならば、スコープ再設定
772- SetEnableScope();
773- }
774- }
775- else{
776- //スコープ解除
777- SetDisableScope();
778- }
779- }
780-
781- //モーション実行
782- MotionCtrl->ChangeShotMode(ChangeWeaponID);
783-
784- //切り替え完了のカウント
785- changeweaponidcnt = ChangeCnt;
786-
787- return 0;
788-}
789-
790790 //! @brief 前進(走り)を設定
791791 //! @attention ゲーム上から直接呼び出すことは避け、ObjectManagerクラスから呼び出してください。
792792 void human::SetMoveForward()
@@ -1147,9 +1147,9 @@
11471147
11481148 //各種カウント初期化
11491149 selectweaponcnt = 0;
1150+ changeweaponidcnt = 0;
11501151 weaponshotcnt = 0;
11511152 weaponreloadcnt = 0;
1152- changeweaponidcnt = 0;
11531153
11541154 //次のフレームの頭の座標を取得
11551155 check_posx = pos_x + cos(rotation_x*-1 - (float)M_PI/2) * sin(add_ry) * HUMAN_HEIGHT;
@@ -1702,7 +1702,7 @@
17021702 if( deadstate == 5 ){ return 3; }
17031703
17041704 int WeaponReloadMotionCnt;
1705- int WeaponChangeWeaponidCnt;
1705+ int WeaponChangeWeaponIDCnt;
17061706 float FallDistance;
17071707 float nowmove_x, nowmove_z;
17081708 int CheckDead;
@@ -1729,14 +1729,14 @@
17291729 }
17301730 }
17311731
1732- //リロード・ショットモード切替カウント取得(モーション用)
1732+ //リロード・武器ID切替カウント取得(モーション用)
17331733 if( weapon[selectweapon] != NULL ){
17341734 WeaponReloadMotionCnt = weaponreloadcnt;
1735- WeaponChangeWeaponidCnt = changeweaponidcnt;
1735+ WeaponChangeWeaponIDCnt = changeweaponidcnt;
17361736 }
17371737 else{
17381738 WeaponReloadMotionCnt = 0;
1739- WeaponChangeWeaponidCnt = 0;
1739+ WeaponChangeWeaponIDCnt = 0;
17401740 }
17411741
17421742 //照準の状態誤差の処理
@@ -1806,7 +1806,7 @@
18061806 }
18071807
18081808 //モーション計算
1809- MotionCtrl->RunFrame(rotation_x, armrotation_y, weapon_paramid, WeaponReloadMotionCnt, WeaponChangeWeaponidCnt, MoveFlag_lt, hp, player);
1809+ MotionCtrl->RunFrame(rotation_x, armrotation_y, weapon_paramid, WeaponReloadMotionCnt, WeaponChangeWeaponIDCnt, MoveFlag_lt, hp, player);
18101810
18111811 if( CheckDead != 0 ){ return 3; }
18121812 return 1;
@@ -2963,7 +2963,7 @@
29632963
29642964 //! @brief 武器を切り替える(持ち替える)
29652965 //! @param weapon_paramid 武器の種類番号
2966-void HumanMotionControl::ChangeWeapon(int weapon_paramid)
2966+void HumanMotionControl::ChangeHaveWeapon(int weapon_paramid)
29672967 {
29682968 //未使用引数対策
29692969 UNREFERENCED_PARAMETER(weapon_paramid);
@@ -2972,6 +2972,15 @@
29722972 reaction_y = DegreeToRadian(-20);
29732973 }
29742974
2975+//! @brief 武器の種類切り替え
2976+//! @param weapon_paramid 武器の種類番号
2977+//! @attention この関数は拡張用のダミー関数です。
2978+void HumanMotionControl::ChangeWeaponID(int weapon_paramid)
2979+{
2980+ //未使用引数対策
2981+ UNREFERENCED_PARAMETER(weapon_paramid);
2982+}
2983+
29752984 //! @brief 発砲処理
29762985 //! @param weapon_paramid 武器の種類番号
29772986 void HumanMotionControl::ShotWeapon(int weapon_paramid)
@@ -3005,15 +3014,6 @@
30053014 //
30063015 }
30073016
3008-//! @brief 武器のショットモード切り替え
3009-//! @param weapon_paramid 武器の種類番号
3010-//! @attention この関数は拡張用のダミー関数です。
3011-void HumanMotionControl::ChangeShotMode(int weapon_paramid)
3012-{
3013- //未使用引数対策
3014- UNREFERENCED_PARAMETER(weapon_paramid);
3015-}
3016-
30173017 //! @brief ジャンプ
30183018 //! @attention この関数は拡張用のダミー関数です。
30193019 void HumanMotionControl::Jump()
@@ -3026,11 +3026,11 @@
30263026 //! @attention armrotation_y 腕の回転角度
30273027 //! @attention weapon_paramid 武器の種類番号
30283028 //! @attention ReloadCnt 武器のリロードカウント
3029-//! @attention ChangeShotModeCnt 武器のショットモード切替カウント
3029+//! @attention ChangeWeaponIDCnt 武器IDの切替カウント
30303030 //! @attention MoveFlag 移動方向を表すフラグ
30313031 //! @attention hp 体力
30323032 //! @attention PlayerFlag プレイヤーかどうか
3033-void HumanMotionControl::RunFrame(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeShotModeCnt, int MoveFlag, int hp, bool PlayerFlag)
3033+void HumanMotionControl::RunFrame(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeWeaponIDCnt, int MoveFlag, int hp, bool PlayerFlag)
30343034 {
30353035 int ArmModelID;
30363036 float move_rx;
@@ -3050,8 +3050,8 @@
30503050 reaction_y = ARMRAD_RELOADWEAPON;
30513051 }
30523052
3053- //武器のショットモード切替中なら腕の角度を再設定
3054- if( ChangeShotModeCnt > 0 ){
3053+ //武器ID切替中なら腕の角度を再設定
3054+ if( ChangeWeaponIDCnt > 0 ){
30553055 reaction_y = ARMRAD_RELOADWEAPON;
30563056 }
30573057
--- trunk/object.h (revision 244)
+++ trunk/object.h (revision 245)
@@ -144,10 +144,10 @@
144144 int noweapon_bullets[TOTAL_HAVEWEAPON]; //!< 武器未所持時の合計弾数
145145 int noweapon_loadbullets[TOTAL_HAVEWEAPON]; //!< 武器未所持時の装弾数
146146 int selectweapon; //!< 武器A/Bの選択
147- int selectweaponcnt; //!< 武器の切り替えカウント
147+ int selectweaponcnt; //!< 武器の切り替え(持ち替え)カウント
148+ int changeweaponidcnt; //!< 武器の種類切り替えカウント
148149 int weaponshotcnt; //!< 武器の連射カウント
149150 int weaponreloadcnt; //!< 武器のリロードカウント
150- int changeweaponidcnt; //!< 武器のショットモード切り替えカウント
151151 int hp; //!< 体力
152152 int deadstate; //!< 死体になっているか
153153 float add_ry; //!< 死体の倒れる加速度
@@ -185,10 +185,11 @@
185185 virtual void SetInvincibleFlag(bool flag);
186186 virtual void SetWeapon(class weapon *in_weapon[], int nlnbs[], int nnbs[]);
187187 virtual int PickupWeapon(class weapon *in_weapon);
188- virtual void ChangeWeapon(int id = -1);
189- virtual int GetChangeWeaponCnt();
188+ virtual void ChangeHaveWeapon(int id = -1);
189+ virtual int GetChangeHaveWeaponCnt();
190+ virtual int ChangeWeaponID();
191+ virtual int GetChangeWeaponIDCnt();
190192 virtual int GetWeaponReloadCnt();
191- virtual int GetChangeWeaponIDCnt();
192193 virtual void GetWeapon(int *out_selectweapon, class weapon *out_weapon[], int nlnbs[], int nnbs[]);
193194 virtual int GetMainWeaponTypeNO();
194195 virtual bool GetWeaponBlazingmode();
@@ -195,7 +196,6 @@
195196 virtual bool ShotWeapon(int *weapon_paramid, int *GunsightErrorRange);
196197 virtual bool ReloadWeapon();
197198 virtual bool DumpWeapon();
198- virtual int ChangeShotMode();
199199 virtual void SetMoveForward();
200200 virtual void SetMoveBack();
201201 virtual void SetMoveLeft();
@@ -380,13 +380,13 @@
380380 void SetModel(int upmodel, int armmodel[], int legmodel, int walkmodel[], int runmodel[]);
381381 void Init(float rx);
382382 void PickupWeapon(int weapon_paramid);
383- void ChangeWeapon(int weapon_paramid);
383+ void ChangeHaveWeapon(int weapon_paramid);
384+ void ChangeWeaponID(int weapon_paramid);
384385 void ShotWeapon(int weapon_paramid);
385386 void ReloadWeapon(int weapon_paramid);
386387 void DumpWeapon();
387- void ChangeShotMode(int weapon_paramid);
388388 void Jump();
389- void RunFrame(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeShotModeCnt, int MoveFlag, int hp, bool PlayerFlag);
389+ void RunFrame(float rotation_x, float armrotation_y, int weapon_paramid, int ReloadCnt, int ChangeWeaponIDCnt, int MoveFlag, int hp, bool PlayerFlag);
390390 void GetRenderMotion(float *arm_rotation_y, float *leg_rotation_x, int *upmodel, int *armmodel, int *legmodel);
391391 };
392392
--- trunk/objectmanager.cpp (revision 244)
+++ trunk/objectmanager.cpp (revision 245)
@@ -2117,50 +2117,24 @@
21172117 //! @brief 武器を切り替える(持ち替える)
21182118 //! @param human_id 人の番号(0〜MAX_HUMAN-1)
21192119 //! @param id 持ち替える武器 (-1 で次の武器)
2120-void ObjectManager::ChangeWeapon(int human_id, int id)
2120+void ObjectManager::ChangeHaveWeapon(int human_id, int id)
21212121 {
21222122 //値の範囲をチェック
21232123 if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return; }
21242124
2125- HumanIndex[human_id].ChangeWeapon(id);
2125+ HumanIndex[human_id].ChangeHaveWeapon(id);
21262126 }
21272127
2128-//! @brief 武器を捨てる
2128+//! @brief 武器の種類切り替え
21292129 //! @param human_id 人の番号(0〜MAX_HUMAN-1)
2130-//! @return 成功:true 失敗:false
2131-bool ObjectManager::DumpWeapon(int human_id)
2132-{
2133- //値の範囲をチェック
2134- if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return false; }
2135-
2136- return HumanIndex[human_id].DumpWeapon();
2137-}
2138-
2139-//! @brief スコープモードを切り替え
2140-//! @param human_id 人の番号(0〜MAX_HUMAN-1)
2141-void ObjectManager::ChangeScopeMode(int human_id)
2142-{
2143- //値の範囲をチェック
2144- if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return; }
2145-
2146- if( HumanIndex[human_id].GetScopeMode() == 0 ){ //スコープを使用していなければ、スコープを設定
2147- HumanIndex[human_id].SetEnableScope();
2148- }
2149- else{ //使用中なら、解除
2150- HumanIndex[human_id].SetDisableScope();
2151- }
2152-}
2153-
2154-//! @brief 武器のショットモード切り替え
2155-//! @param human_id 人の番号(0〜MAX_HUMAN-1)
21562130 //! @return 成功:0 失敗:1
2157-int ObjectManager::ChangeShotMode(int human_id)
2131+int ObjectManager::ChangeWeaponID(int human_id)
21582132 {
21592133 //値の範囲をチェック
21602134 if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return 1; }
21612135
2162- //武器のショットモードを切り替えたら
2163- if( HumanIndex[human_id].ChangeShotMode() == 0 ){
2136+ //武器の種類を切り替えたら
2137+ if( HumanIndex[human_id].ChangeWeaponID() == 0 ){
21642138 int selectweapon;
21652139 weapon *weapon[TOTAL_HAVEWEAPON];
21662140 int WeaponID;
@@ -2190,6 +2164,32 @@
21902164 return 1;
21912165 }
21922166
2167+//! @brief 武器を捨てる
2168+//! @param human_id 人の番号(0〜MAX_HUMAN-1)
2169+//! @return 成功:true 失敗:false
2170+bool ObjectManager::DumpWeapon(int human_id)
2171+{
2172+ //値の範囲をチェック
2173+ if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return false; }
2174+
2175+ return HumanIndex[human_id].DumpWeapon();
2176+}
2177+
2178+//! @brief スコープモードを切り替え
2179+//! @param human_id 人の番号(0〜MAX_HUMAN-1)
2180+void ObjectManager::ChangeScopeMode(int human_id)
2181+{
2182+ //値の範囲をチェック
2183+ if( (human_id < 0)||(MAX_HUMAN <= human_id) ){ return; }
2184+
2185+ if( HumanIndex[human_id].GetScopeMode() == 0 ){ //スコープを使用していなければ、スコープを設定
2186+ HumanIndex[human_id].SetEnableScope();
2187+ }
2188+ else{ //使用中なら、解除
2189+ HumanIndex[human_id].SetDisableScope();
2190+ }
2191+}
2192+
21932193 //! @brief 裏技・所持している武器の弾を追加
21942194 //! @param human_id 人の番号(0〜MAX_HUMAN-1)
21952195 //! @return 成功:true 失敗:false
--- trunk/objectmanager.h (revision 244)
+++ trunk/objectmanager.h (revision 245)
@@ -160,10 +160,10 @@
160160 void MoveJump(int human_id);
161161 int ShotWeapon(int human_id);
162162 void ReloadWeapon(int human_id);
163- void ChangeWeapon(int human_id, int id = -1);
163+ void ChangeHaveWeapon(int human_id, int id = -1);
164+ int ChangeWeaponID(int human_id);
164165 bool DumpWeapon(int human_id);
165166 void ChangeScopeMode(int human_id);
166- int ChangeShotMode(int human_id);
167167 bool CheatAddBullet(int human_id);
168168 bool CheatNewWeapon(int human_id, int new_weaponID);
169169 bool CheckZombieAttack(human* MyHuman, human* EnemyHuman);