• R/O
  • SSH
  • HTTPS

Commit

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

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


Commit MetaInfo

Revision288 (tree)
Zeit2022-02-10 02:09:28
Autorxops-mikan

Log Message

武器が自由落下する際の当たり判定の変更、武器設定パラメーターの変数名を変更。

Ändern Zusammenfassung

Diff

--- trunk/gamemain.cpp (revision 287)
+++ trunk/gamemain.cpp (revision 288)
@@ -2755,7 +2755,7 @@
27552755 int hp;
27562756 int param_scopemode;
27572757 int param_WeaponP;
2758- int param_burst;
2758+ int param_pellet;
27592759 int ErrorRange;
27602760
27612761 //各種設定やゲーム情報を取得
@@ -2789,7 +2789,7 @@
27892789 hp = myHuman->GetHP();
27902790 param_scopemode = weapon_paramdata.scopemode;
27912791 param_WeaponP = weapon_paramdata.WeaponP;
2792- param_burst = weapon_paramdata.burst;
2792+ param_pellet = weapon_paramdata.pellet;
27932793 ErrorRange = myHuman->GetGunsightErrorRange();
27942794
27952795 float human_x, human_y, human_z, human_rx;
@@ -3030,7 +3030,7 @@
30303030 }
30313031
30323032 //照準表示
3033- if( (Camera_F1mode == false)&&(param_WeaponP != 2)&&(param_burst > 0) ){
3033+ if( (Camera_F1mode == false)&&(param_WeaponP != 2)&&(param_pellet > 0) ){
30343034 if( (weapon[selectweapon] != NULL) ){
30353035 if( (myHuman->GetScopeMode() == 1)||(param_scopemode == 2) ){
30363036 //簡易スコープ使用中か、精密スコープを所持しているなら、
--- trunk/object.cpp (revision 287)
+++ trunk/object.cpp (revision 288)
@@ -2070,12 +2070,12 @@
20702070
20712071 //設定値を取得
20722072 WeaponParameter ParamData;
2073- int param_burst;
2073+ int param_pellet;
20742074 if( Param->GetWeapon(id_parameter, &ParamData) == 1 ){ return 1; }
2075- param_burst = ParamData.burst;
2075+ param_pellet = ParamData.pellet;
20762076
2077- //発射する弾の数が0未満なら失敗
2078- if( param_burst <= 0 ){ return 1; }
2077+ //発射する弾の数(ペレット数)が0未満なら失敗
2078+ if( param_pellet <= 0 ){ return 1; }
20792079
20802080 //武器が手榴弾ならば〜
20812081 if( id_parameter == ID_WEAPON_GRENADE ){
@@ -2229,17 +2229,20 @@
22292229 }
22302230 }
22312231
2232- //ブロックに接していれば、そこまで落下する
2233- if( CollD->CheckALLBlockIntersectDummyRay(pos_x, pos_y, pos_z, 0, -1, 0, NULL, NULL, &Dist, fabs(move_y)) == true ){
2234- CollD->CheckALLBlockIntersectRay(pos_x, pos_y, pos_z, 0, -1, 0, NULL, NULL, &Dist, fabs(move_y));
2235- pos_y -= Dist - 0.2f;
2236- motionflag = false;
2237- return 0;
2232+ //落下処理
2233+ for(int i=0; i<2; i++){
2234+ //ブロックに埋まっていれば、そこで処理終了
2235+ if( CollD->CheckALLBlockInside(pos_x, pos_y + move_y*0.5f, pos_z) == true ){
2236+ motionflag = false;
2237+ return 0;
2238+ }
2239+
2240+ //落下させる
2241+ pos_y += move_y*0.5f;
22382242 }
22392243
2240- //座標を反映
2244+ //水平方向の座標を反映
22412245 pos_x += move_x;
2242- pos_y += move_y;
22432246 pos_z += move_z;
22442247 }
22452248
--- trunk/objectmanager.cpp (revision 287)
+++ trunk/objectmanager.cpp (revision 288)
@@ -1959,18 +1959,18 @@
19591959 if( grenadeflag == false ){
19601960 class bullet* newbullet;
19611961
1962- //(ショットガンなど)発射する弾の数分繰り返す
1963- for(int i=0; i<ParamData.burst; i++){
1962+ //ショットガンなど発射する弾(ペレット)の数分繰り返す
1963+ for(int i=0; i<ParamData.pellet; i++){
19641964 int attacks;
19651965 float ontargetcnt;
19661966 float rx2, ry2;
19671967
1968- //(ショットガンなど)発射する弾が複数あれば
1969- if( ParamData.burst > 1 ){
1968+ //ショットガンなど発射する弾(ペレット)が複数あれば
1969+ if( ParamData.pellet > 1 ){
19701970 //1個の弾あたりの攻撃力と命中時のカウント数を算出
19711971 //  全弾合わせて、2倍になるようにする。
1972- attacks = (int)( (float)ParamData.attacks / ((float)ParamData.burst/2) );
1973- ontargetcnt = 1.0f / ((float)ParamData.burst/2);
1972+ attacks = (int)( (float)ParamData.attacks / ((float)ParamData.pellet/2) );
1973+ ontargetcnt = 1.0f / ((float)ParamData.pellet/2);
19741974
19751975 //さらに誤差を増やして拡散させる
19761976 int len;
--- trunk/parameter.cpp (revision 287)
+++ trunk/parameter.cpp (revision 288)
@@ -485,7 +485,7 @@
485485 Weapon[0].WeaponP = 2;
486486 Weapon[0].ChangeWeaponID = -1;
487487 Weapon[0].ChangeWeaponCnt = 0;
488- Weapon[0].burst = 0;
488+ Weapon[0].pellet = 0;
489489 Weapon[1].name = "MP5";
490490 Weapon[1].model = "./data/model/weapon/mp5.x";
491491 Weapon[1].texture= "./data/model/weapon/mp5.bmp";
@@ -518,7 +518,7 @@
518518 Weapon[1].WeaponP = 0;
519519 Weapon[1].ChangeWeaponID = -1;
520520 Weapon[1].ChangeWeaponCnt = 0;
521- Weapon[1].burst = 1;
521+ Weapon[1].pellet = 1;
522522 Weapon[2].name = "PSG1";
523523 Weapon[2].model = "./data/model/weapon/psg1.x";
524524 Weapon[2].texture= "./data/model/weapon/psg1.bmp";
@@ -551,7 +551,7 @@
551551 Weapon[2].WeaponP = 0;
552552 Weapon[2].ChangeWeaponID = -1;
553553 Weapon[2].ChangeWeaponCnt = 0;
554- Weapon[2].burst = 1;
554+ Weapon[2].pellet = 1;
555555 Weapon[3].name = "M92F";
556556 Weapon[3].model = "./data/model/weapon/m92f.x";
557557 Weapon[3].texture= "./data/model/weapon/m92f.bmp";
@@ -584,7 +584,7 @@
584584 Weapon[3].WeaponP = 1;
585585 Weapon[3].ChangeWeaponID = -1;
586586 Weapon[3].ChangeWeaponCnt = 0;
587- Weapon[3].burst = 1;
587+ Weapon[3].pellet = 1;
588588 Weapon[4].name = "GLOCK18 SEMI";
589589 Weapon[4].model = "./data/model/weapon/glock18.x";
590590 Weapon[4].texture= "./data/model/weapon/glock18.bmp";
@@ -617,7 +617,7 @@
617617 Weapon[4].WeaponP = 1;
618618 Weapon[4].ChangeWeaponID = 16;
619619 Weapon[4].ChangeWeaponCnt = 0;
620- Weapon[4].burst = 1;
620+ Weapon[4].pellet = 1;
621621 Weapon[5].name = "DESERT EAGLE";
622622 Weapon[5].model = "./data/model/weapon/de.x";
623623 Weapon[5].texture= "./data/model/weapon/de.bmp";
@@ -650,7 +650,7 @@
650650 Weapon[5].WeaponP = 1;
651651 Weapon[5].ChangeWeaponID = -1;
652652 Weapon[5].ChangeWeaponCnt = 0;
653- Weapon[5].burst = 1;
653+ Weapon[5].pellet = 1;
654654 Weapon[6].name = "MAC10";
655655 Weapon[6].model = "./data/model/weapon/mac10.x";
656656 Weapon[6].texture= "./data/model/weapon/mac10.bmp";
@@ -683,7 +683,7 @@
683683 Weapon[6].WeaponP = 1;
684684 Weapon[6].ChangeWeaponID = -1;
685685 Weapon[6].ChangeWeaponCnt = 0;
686- Weapon[6].burst = 1;
686+ Weapon[6].pellet = 1;
687687 Weapon[7].name = "UMP";
688688 Weapon[7].model = "./data/model/weapon/ump.x";
689689 Weapon[7].texture= "./data/model/weapon/ump.bmp";
@@ -716,7 +716,7 @@
716716 Weapon[7].WeaponP = 0;
717717 Weapon[7].ChangeWeaponID = -1;
718718 Weapon[7].ChangeWeaponCnt = 0;
719- Weapon[7].burst = 1;
719+ Weapon[7].pellet = 1;
720720 Weapon[8].name = "P90";
721721 Weapon[8].model = "./data/model/weapon/p90.x";
722722 Weapon[8].texture= "./data/model/weapon/p90.bmp";
@@ -749,7 +749,7 @@
749749 Weapon[8].WeaponP = 0;
750750 Weapon[8].ChangeWeaponID = -1;
751751 Weapon[8].ChangeWeaponCnt = 0;
752- Weapon[8].burst = 1;
752+ Weapon[8].pellet = 1;
753753 Weapon[9].name = "M4";
754754 Weapon[9].model = "./data/model/weapon/m4.x";
755755 Weapon[9].texture= "./data/model/weapon/m4.bmp";
@@ -782,7 +782,7 @@
782782 Weapon[9].WeaponP = 0;
783783 Weapon[9].ChangeWeaponID = -1;
784784 Weapon[9].ChangeWeaponCnt = 0;
785- Weapon[9].burst = 1;
785+ Weapon[9].pellet = 1;
786786 Weapon[10].name = "AK47";
787787 Weapon[10].model = "./data/model/weapon/ak47.x";
788788 Weapon[10].texture= "./data/model/weapon/ak47.bmp";
@@ -815,7 +815,7 @@
815815 Weapon[10].WeaponP = 0;
816816 Weapon[10].ChangeWeaponID = -1;
817817 Weapon[10].ChangeWeaponCnt = 0;
818- Weapon[10].burst = 1;
818+ Weapon[10].pellet = 1;
819819 Weapon[11].name = "AUG";
820820 Weapon[11].model = "./data/model/weapon/aug.x";
821821 Weapon[11].texture= "./data/model/weapon/aug.bmp";
@@ -848,7 +848,7 @@
848848 Weapon[11].WeaponP = 0;
849849 Weapon[11].ChangeWeaponID = -1;
850850 Weapon[11].ChangeWeaponCnt = 0;
851- Weapon[11].burst = 1;
851+ Weapon[11].pellet = 1;
852852 Weapon[12].name = "M249";
853853 Weapon[12].model = "./data/model/weapon/m249.x";
854854 Weapon[12].texture= "./data/model/weapon/m249.bmp";
@@ -881,7 +881,7 @@
881881 Weapon[12].WeaponP = 0;
882882 Weapon[12].ChangeWeaponID = -1;
883883 Weapon[12].ChangeWeaponCnt = 0;
884- Weapon[12].burst = 1;
884+ Weapon[12].pellet = 1;
885885 Weapon[13].name = "GRENADE"; // ID_WEAPON_GRENADE 定数を要設定
886886 Weapon[13].model = "./data/model/weapon/grenade.x";
887887 Weapon[13].texture= "./data/model/weapon/grenade.bmp";
@@ -914,7 +914,7 @@
914914 Weapon[13].WeaponP = 1;
915915 Weapon[13].ChangeWeaponID = -1;
916916 Weapon[13].ChangeWeaponCnt = 0;
917- Weapon[13].burst = 1;
917+ Weapon[13].pellet = 1;
918918 Weapon[14].name = "MP5SD";
919919 Weapon[14].model = "./data/model/weapon/mp5sd.x";
920920 Weapon[14].texture= "./data/model/weapon/mp5sd.bmp";
@@ -947,7 +947,7 @@
947947 Weapon[14].WeaponP = 0;
948948 Weapon[14].ChangeWeaponID = -1;
949949 Weapon[14].ChangeWeaponCnt = 0;
950- Weapon[14].burst = 1;
950+ Weapon[14].pellet = 1;
951951 Weapon[15].name = "CASE"; // ID_WEAPON_CASE 定数を要設定
952952 Weapon[15].model = "./data/model/weapon/case.x";
953953 Weapon[15].texture= "./data/model/weapon/case.bmp";
@@ -980,7 +980,7 @@
980980 Weapon[15].WeaponP = 2;
981981 Weapon[15].ChangeWeaponID = -1;
982982 Weapon[15].ChangeWeaponCnt = 0;
983- Weapon[15].burst = 1;
983+ Weapon[15].pellet = 1;
984984 Weapon[16].name = "GLOCK18 FULL";
985985 Weapon[16].model = "./data/model/weapon/glock18.x";
986986 Weapon[16].texture= "./data/model/weapon/glock18.bmp";
@@ -1013,7 +1013,7 @@
10131013 Weapon[16].WeaponP = 1;
10141014 Weapon[16].ChangeWeaponID = 4;
10151015 Weapon[16].ChangeWeaponCnt = 0;
1016- Weapon[16].burst = 1;
1016+ Weapon[16].pellet = 1;
10171017 Weapon[17].name = "M1911";
10181018 Weapon[17].model = "./data/model/weapon/cg.x";
10191019 Weapon[17].texture= "./data/model/weapon/cg.bmp";
@@ -1046,7 +1046,7 @@
10461046 Weapon[17].WeaponP = 1;
10471047 Weapon[17].ChangeWeaponID = -1;
10481048 Weapon[17].ChangeWeaponCnt = 0;
1049- Weapon[17].burst = 1;
1049+ Weapon[17].pellet = 1;
10501050 Weapon[18].name = "GLOCK17";
10511051 Weapon[18].model = "./data/model/weapon/glock18.x";
10521052 Weapon[18].texture= "./data/model/weapon/glock17.bmp";
@@ -1079,7 +1079,7 @@
10791079 Weapon[18].WeaponP = 1;
10801080 Weapon[18].ChangeWeaponID = -1;
10811081 Weapon[18].ChangeWeaponCnt = 0;
1082- Weapon[18].burst = 1;
1082+ Weapon[18].pellet = 1;
10831083 Weapon[19].name = "M1";
10841084 Weapon[19].model = "./data/model/weapon/m1.x";
10851085 Weapon[19].texture= "./data/model/weapon/m1.bmp";
@@ -1112,7 +1112,7 @@
11121112 Weapon[19].WeaponP = 0;
11131113 Weapon[19].ChangeWeaponID = -1;
11141114 Weapon[19].ChangeWeaponCnt = 0;
1115- Weapon[19].burst = 6;
1115+ Weapon[19].pellet = 6;
11161116 Weapon[20].name = "FAMAS";
11171117 Weapon[20].model = "./data/model/weapon/famas.x";
11181118 Weapon[20].texture= "./data/model/weapon/famas.bmp";
@@ -1145,7 +1145,7 @@
11451145 Weapon[20].WeaponP = 0;
11461146 Weapon[20].ChangeWeaponID = -1;
11471147 Weapon[20].ChangeWeaponCnt = 0;
1148- Weapon[20].burst = 1;
1148+ Weapon[20].pellet = 1;
11491149 Weapon[21].name = "MK23";
11501150 Weapon[21].model = "./data/model/weapon/mk23.x";
11511151 Weapon[21].texture= "./data/model/weapon/mk23.bmp";
@@ -1178,7 +1178,7 @@
11781178 Weapon[21].WeaponP = 1;
11791179 Weapon[21].ChangeWeaponID = -1;
11801180 Weapon[21].ChangeWeaponCnt = 0;
1181- Weapon[21].burst = 1;
1181+ Weapon[21].pellet = 1;
11821182 Weapon[22].name = "MK23 SD";
11831183 Weapon[22].model = "./data/model/weapon/mk23sd.x";
11841184 Weapon[22].texture= "./data/model/weapon/mk23.bmp";
@@ -1211,7 +1211,7 @@
12111211 Weapon[22].WeaponP = 1;
12121212 Weapon[22].ChangeWeaponID = -1;
12131213 Weapon[22].ChangeWeaponCnt = 0;
1214- Weapon[22].burst = 1;
1214+ Weapon[22].pellet = 1;
12151215
12161216 #ifdef ENABLE_BUG_HUMANWEAPON
12171217 //特殊なバグ武器用データ
@@ -1247,7 +1247,7 @@
12471247 BugWeapon[0].WeaponP = 1;
12481248 BugWeapon[0].ChangeWeaponID = -1;
12491249 BugWeapon[0].ChangeWeaponCnt = 0;
1250- BugWeapon[0].burst = 0;
1250+ BugWeapon[0].pellet = 0;
12511251 #endif
12521252
12531253
--- trunk/parameter.h (revision 287)
+++ trunk/parameter.h (revision 288)
@@ -100,7 +100,7 @@
100100 int WeaponP; //!< 装備方法
101101 int ChangeWeaponID; //!< 切り替える武器対象
102102 int ChangeWeaponCnt; //!< 武器切り替え時間
103- int burst; //!< 発射弾数
103+ int pellet; //!< 発射弾数(ペレット数)
104104 };
105105
106106 //! 小物設定用の構造体