• 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

Revision238 (tree)
Time2020-04-07 02:09:10
Authorxops-mikan

Log Message

エフェクト処理全般を、独自の計算処理から本家XOPS同等の計算処理へ置き換え。

Change Summary

Incremental Difference

--- trunk/object.cpp (revision 237)
+++ trunk/object.cpp (revision 238)
@@ -2679,19 +2679,28 @@
26792679 }
26802680
26812681 //! @brief コンストラクタ
2682-effect::effect(float x, float y, float z, float size, float rotation, int count, int texture, int settype)
2682+effect::effect(float x, float y, float z, float size, float rotation, int texture, int count)
26832683 {
26842684 pos_x = x;
26852685 pos_y = y;
26862686 pos_z = z;
2687- model_size = size;
2687+ move_x = 0.0f;
2688+ move_y = 0.0f;
2689+ move_z = 0.0f;
2690+ addmove_y = 0.0f;
26882691 rotation_x = 0.0f;
26892692 rotation_y = 0.0f;
26902693 rotation_texture = rotation;
2694+ addrotation_texture = 0.0f;
2695+ model_size = size;
2696+ addmodel_size = 0.0f;
2697+ id_texture = texture;
2698+ brightness = 0;
2699+ addbrightness = 0;
2700+ alpha = 1.0f;
2701+ add_alpha = 0.0f;
26912702 cnt = count;
2692- setcnt = count;
2693- id_texture = texture;
2694- type = settype;
2703+ type = EFFECT_NORMAL;
26952704 if( cnt > 0 ){
26962705 EnableFlag = true;
26972706 }
@@ -2698,7 +2707,6 @@
26982707 else{
26992708 EnableFlag = false;
27002709 }
2701- alpha = 1.0f;
27022710 }
27032711
27042712 //! @brief ディストラクタ
@@ -2709,36 +2717,42 @@
27092717 //! @param in_move_x X軸移動量
27102718 //! @param in_move_y Y軸移動量
27112719 //! @param in_move_z Z軸移動量
2720+//! @param in_addmove_y Y軸移動量の加算量
2721+//! @param rotation 回転角度
2722+//! @param addrotation 回転角度の加算量
27122723 //! @param size 描画倍率
2713-//! @param rotation 回転角度
2714-//! @param count 描画フレーム数
2715-//! @param texture テクスチャの認識番号
2724+//! @param addsize 描画倍率
2725+//! @param count カウント
27162726 //! @param settype エフェクトの種類 (Effect_Type を組み合せる)
2717-//! @param init オブジェクトを初期化
2718-void effect::SetParamData(float in_move_x, float in_move_y, float in_move_z, float size, float rotation, int count, int texture, int settype, bool init)
2727+void effect::SetParamData(float in_move_x, float in_move_y, float in_move_z, float in_addmove_y, float rotation, float addrotation, float size, float addsize, int count, int settype)
27192728 {
27202729 move_x = in_move_x;
27212730 move_y = in_move_y;
27222731 move_z = in_move_z;
2732+ addmove_y = in_addmove_y;
2733+ rotation_x = addrotation;
2734+ rotation_y = 0.0f;
2735+ rotation_texture = rotation;
2736+ addrotation_texture = addrotation;
27232737 model_size = size;
2724- rotation_texture = rotation;
2738+ addmodel_size = addsize;
27252739 cnt = count;
2726- setcnt = count;
2727- id_texture = texture;
27282740 type = settype;
2741+}
27292742
2730- if( type & EFFECT_TRANSLUCENT ){
2731- set_alpha = 0.5f;
2732- }
2733- else{
2734- set_alpha = 1.0f;
2735- }
2736- alpha = set_alpha;
2737-
2738- if( init == true ){
2739- rotation_x = 0.0f;
2740- rotation_y = 0.0f;
2741- }
2743+//! @brief テクスチャを設定
2744+//! @param id テクスチャ認識番号
2745+//! @param in_brightness 明るさ
2746+//! @param in_addbrightness 明るさの加算量
2747+//! @param in_alpha 透明度
2748+//! @param in_addalpha 透明度の加算量
2749+void effect::SetTexture(int id, int in_brightness, int in_addbrightness, float in_alpha, float in_addalpha)
2750+{
2751+ id_texture = id;
2752+ brightness = in_brightness;
2753+ addbrightness = in_addbrightness;
2754+ alpha = in_alpha;
2755+ add_alpha = in_addalpha;
27422756 }
27432757
27442758 //! @brief 横軸と縦軸の向きを設定
@@ -2789,7 +2803,7 @@
27892803 //初期化されていなければ処理しない
27902804 if( EnableFlag == false ){ return 0; }
27912805
2792- //カウントが終了したら、処理しないように設定
2806+ //カウントが終了していれば、処理しないように設定
27932807 if( cnt <= 0 ){
27942808 EnableFlag = false;
27952809 return 2;
@@ -2805,33 +2819,29 @@
28052819 pos_x += move_x;
28062820 pos_y += move_y;
28072821 pos_z += move_z;
2822+ move_y += addmove_y;
28082823
2809- //特殊処理を実行
2810- if( type & EFFECT_DISAPPEAR ){ //消す
2811- alpha -= set_alpha/setcnt;
2824+ //回転
2825+ rotation_texture += addrotation_texture;
2826+
2827+ //拡大
2828+ model_size += addmodel_size;
2829+
2830+ //明るさと透明度
2831+ brightness += addbrightness;
2832+ alpha += add_alpha;
2833+
2834+ //透明度がマイナスになったら、処理しないように設定
2835+ if( alpha <= 0.0f ){
2836+ EnableFlag = false;
2837+ cnt = 0;
2838+ return 2;
28122839 }
2813- if( type & EFFECT_DISAPPEARHALF ){ //半分の時間で消す
2814- if( setcnt/2 > cnt ){
2815- alpha -= set_alpha/(setcnt/2);
2816- }
2840+
2841+ //カウントが 255 未満ならば、カウントを 1 引く
2842+ if( cnt < 255 ){
2843+ cnt -= 1;
28172844 }
2818- if( type & EFFECT_MAGNIFY ){ //拡大
2819- model_size += model_size/50;
2820- }
2821- if( type & EFFECT_ROTATION ){ //回転
2822- if( rotation_texture > 0.0f ){
2823- rotation_texture += DegreeToRadian(1);
2824- }
2825- else{
2826- rotation_texture -= DegreeToRadian(1);
2827- }
2828- }
2829- if( type & EFFECT_FALL ){ //落下
2830- move_y = (move_y - 0.17f) * 0.98f;
2831- }
2832-
2833- //カウントを 1 引く
2834- cnt -= 1;
28352845 return 1;
28362846 }
28372847
--- trunk/object.h (revision 237)
+++ trunk/object.h (revision 238)
@@ -326,21 +326,26 @@
326326 class effect : public object
327327 {
328328 protected:
329- int type; //!< 種類
330- float rotation_y; //!< 回転角度
331329 float move_x; //!< X軸移動量
332330 float move_y; //!< Y軸移動量
333331 float move_z; //!< Z軸移動量
334- float rotation_texture; //!< 回転角度
335- float alpha; //!< 透明度
336- float set_alpha; //!< スタート時の透明度
332+ float addmove_y; //!< Y軸移動量の加算量
333+ float rotation_y; //!< 回転角度
334+ float rotation_texture; //!< 回転角度
335+ float addrotation_texture; //!< 回転角度の加算量
336+ float addmodel_size; //!< 描画サイズ
337+ int brightness; //!< 明るさ
338+ int addbrightness; //!< 明るさの加算量
339+ float alpha; //!< 透明度
340+ float add_alpha; //!< 透明度の加算量
337341 int cnt; //!< カウント
338- int setcnt; //!< 設定されたカウント
342+ int type; //!< 種類
339343
340344 public:
341- effect(float x = 0.0f, float y = 0.0f, float z = 0.0f, float size = 1.0f, float rotation = 0.0f, int count = 0, int texture = 0, int settype = 0);
345+ effect(float x = 0.0f, float y = 0.0f, float z = 0.0f, float size = 1.0f, float rotation = 0.0f, int texture = -1, int count = 0);
342346 ~effect();
343- virtual void SetParamData(float in_move_x, float in_move_y, float in_move_z, float size, float rotation, int count, int texture, int settype, bool init);
347+ virtual void SetParamData(float in_move_x, float in_move_y, float in_move_z, float in_addmove_y, float rotation, float addrotation, float size, float addsize, int count, int settype);
348+ virtual void SetTexture(int id, int in_brightness, int in_addbrightness, float in_alpha, float in_addalpha);
344349 virtual void SetRxRy(float rx, float ry);
345350 virtual int GetTextureID();
346351 virtual void GetMove(float *mx, float *my, float *mz);
@@ -404,14 +409,8 @@
404409 //! エフェクトの種類を表す定数
405410 enum Effect_Type {
406411 EFFECT_NORMAL = 0x00, //!< ノーマル
407- EFFECT_DISAPPEAR = 0x01, //!< 消す
408- EFFECT_DISAPPEARHALF = 0x02, //!< 半分の時間で消す
409- EFFECT_TRANSLUCENT = 0x04, //!< 半透明
410- EFFECT_MAGNIFY = 0x08, //!< 拡大
411- EFFECT_ROTATION = 0x10, //!< 回転
412- EFFECT_FALL = 0x20, //!< 落下
413- EFFECT_NOBILLBOARD = 0x40, //!< ビルボード化しない
414- EFFECT_COLLIDEMAP = 0x80 //!< マップとの当たり判定
412+ EFFECT_NOBILLBOARD = 0x01, //!< ビルボード化しない
413+ EFFECT_COLLIDEMAP = 0x02 //!< マップとの当たり判定
415414 };
416415
417416 #endif
\ No newline at end of file
--- trunk/objectmanager.cpp (revision 237)
+++ trunk/objectmanager.cpp (revision 238)
@@ -518,18 +518,26 @@
518518 //! @param move_x X軸移動量
519519 //! @param move_y Y軸移動量
520520 //! @param move_z Z軸移動量
521+//! @param addmove_y Y軸移動量の加算量
522+//! @param rotation 回転角度
523+//! @param addrotation 回転角度の加算量
521524 //! @param size 描画倍率
522-//! @param rotation 回転角度
523-//! @param count 描画フレーム数
525+//! @param addsize 描画倍率
524526 //! @param texture テクスチャの認識番号
527+//! @param brightness 明るさ
528+//! @param addbrightness 明るさの加算量
529+//! @param alpha 透明度
530+//! @param addalpha 透明度の加算量
525531 //! @param settype エフェクトの種類 (Effect_Type を組み合せる)
532+//! @param count 描画フレーム数
526533 //! @return 成功:データ番号(0以上) 失敗:-1
527-int ObjectManager::AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float size, float rotation, int count, int texture, int settype)
534+int ObjectManager::AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float addmove_y, float rotation, float addrotation, float size, float addsize, int texture, int brightness, int addbrightness, float alpha, float addalpha, int settype, int count)
528535 {
529536 for(int i=0; i<MAX_EFFECT; i++){
530537 if( EffectIndex[i].GetEnableFlag() == false ){
531538 EffectIndex[i].SetPosData(pos_x, pos_y, pos_z, 0.0f);
532- EffectIndex[i].SetParamData(move_x, move_y, move_z, size, rotation, count, texture, settype, true);
539+ EffectIndex[i].SetParamData(move_x, move_y, move_z, addmove_y, rotation, addrotation, size, addsize, count, settype);
540+ EffectIndex[i].SetTexture(texture, brightness, addbrightness, alpha, addalpha);
533541 EffectIndex[i].SetEnableFlag(true);
534542 return i;
535543 }
@@ -546,10 +554,14 @@
546554 //! @param pos_z Z座標
547555 //! @param size 描画倍率
548556 //! @param rotation 回転角度
557+//! @param texture テクスチャの認識番号
558+//! @param brightness 明るさ
559+//! @param addbrightness 明るさの加算量
560+//! @param alpha 透明度
561+//! @param addalpha 透明度の加算量
549562 //! @param count 描画フレーム数
550-//! @param texture テクスチャの認識番号
551563 //! @return 成功:データ番号(0以上) 失敗:-1
552-int ObjectManager::AddMapEffect(int id, int face, float pos_x, float pos_y, float pos_z, float size, float rotation, int count, int texture)
564+int ObjectManager::AddMapEffect(int id, int face, float pos_x, float pos_y, float pos_z, float size, float rotation, int texture, int brightness, int addbrightness, float alpha, float addalpha, int count)
553565 {
554566 blockdata data;
555567 float vx, vy, vz;
@@ -569,8 +581,9 @@
569581 for(int i=0; i<MAX_EFFECT; i++){
570582 if( EffectIndex[i].GetEnableFlag() == false ){
571583 EffectIndex[i].SetPosData(pos_x, pos_y, pos_z, 0.0f);
572- EffectIndex[i].SetParamData(0.0f, 0.0f, 0.0f, size, rotation, count, texture, EFFECT_DISAPPEARHALF | EFFECT_NOBILLBOARD, true);
584+ EffectIndex[i].SetParamData(0.0f, 0.0f, 0.0f, 0.0f, rotation, 0.0f, size, 0.0f, count, EFFECT_NOBILLBOARD);
573585 EffectIndex[i].SetRxRy(rx, ry);
586+ EffectIndex[i].SetTexture(texture, brightness, addbrightness, alpha, addalpha);
574587 EffectIndex[i].SetEnableFlag(true);
575588 return i;
576589 }
@@ -584,12 +597,12 @@
584597 //! @param y Y座標
585598 //! @param z Z座標
586599 //! @param damage ダメージ
587-//! @param CollideMap マップへの付着
588-void ObjectManager::SetHumanBlood(float x, float y, float z, int damage, bool CollideMap)
600+//! @param flowing 流血の有無
601+void ObjectManager::SetHumanBlood(float x, float y, float z, int damage, bool flowing)
589602 {
590603 int addtype;
591604
592- if( CollideMap == false ){
605+ if( flowing == false ){
593606 addtype = EFFECT_NORMAL;
594607 }
595608 else{
@@ -597,10 +610,12 @@
597610 }
598611
599612 if( GameConfig.GetBloodFlag() == true ){
600- AddEffect(x, y, z, 0.0f, 0.0f, 0.0f, 10.0f, DegreeToRadian(10)*GetRand(18), (int)(GAMEFPS * 0.4f), Resource->GetEffectBloodTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_TRANSLUCENT | addtype);
601- for(int i=0; i<(damage/10); i++){
602- float rx = DegreeToRadian(10)*GetRand(36);
603- AddEffect(x + cos(rx)*1.0f, y + (float)(GetRand(20)-10)/10, z + sin(rx)*1.0f, cos(rx)*0.5f, GetRand(5)*0.1f + 0.5f, sin(rx)*0.5f, 5.0f, DegreeToRadian(10)*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectBloodTexture(), EFFECT_FALL | EFFECT_TRANSLUCENT | addtype);
613+ AddEffect(x, y, z, 0.0f, 0.0f, 0.0f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, 10.0f, 0.2f, Resource->GetEffectBloodTexture(), 10, 0, 0.5f, -0.04f, addtype, (int)(GAMEFPS * 0.4f));
614+ if( flowing == true ){
615+ for(int i=0; i<(damage/10); i++){
616+ float rx = DegreeToRadian(10)*GetRand(36);
617+ AddEffect(x + cos(rx)*1.0f, y + (float)(GetRand(20)-10)/10, z + sin(rx)*1.0f, cos(rx)*0.5f, GetRand(5)*0.1f + 0.5f, sin(rx)*0.5f, -0.09f, DegreeToRadian(10)*GetRand(36), 0.0f, GetRand(40)*0.1f+0.1f, 0.1f, Resource->GetEffectBloodTexture(), 10, 0, 1.0f, 0.0f, addtype, (int)(GAMEFPS * 0.5f));
618+ }
604619 }
605620 }
606621 }
@@ -859,7 +874,7 @@
859874 void ObjectManager::HitBulletMap(float x, float y, float z, int teamID)
860875 {
861876 //エフェクト(煙)を描画
862- AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, 5.0f, DegreeToRadian(10)*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY);
877+ AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, 3.0f, 0.24f, Resource->GetEffectSmokeTexture(), 20, 0, 0.63f, -0.03f, EFFECT_NORMAL, 20);
863878
864879 //効果音を再生
865880 GameSound->HitMap(x, y, z, teamID);
@@ -979,7 +994,10 @@
979994 SmallObjectIndex[HitSmallObject_id].HitBullet(attacks);
980995
981996 //エフェクト(煙)を描画
982- AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, 5.0f, DegreeToRadian(10)*GetRand(18), (int)(GAMEFPS * 0.5f), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY);
997+ //AddEffect(x, y, z, 0.01f*(GetRand(101)-50), 0.01f*(GetRand(101)-50), 0.01f*(GetRand(101)-50), 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, 1.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 0.625f, -0.047f, EFFECT_NORMAL, 255);
998+ //AddEffect(x, y, z, 0.01f*(GetRand(101)-50), 0.01f*(GetRand(101)-50), 0.01f*(GetRand(101)-50), 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, 1.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 0.625f, -0.047f, EFFECT_NORMAL, 255);
999+ AddEffect(x, y, z, 0.0f, 0.0f, 0.0f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, 1.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 0.625f, -0.047f, EFFECT_NORMAL, 255);
1000+ AddEffect(x, y, z, 0.0f, 0.01f*(GetRand(10)-5), 0.0f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, 1.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 0.625f, -0.047f, EFFECT_NORMAL, 255);
9831001
9841002 //効果音を再生
9851003 int id;
@@ -1172,14 +1190,17 @@
11721190 }
11731191
11741192 //エフェクト(フラッシュ)の描画
1175- AddEffect(gx, gy, gz, 0.0f, 0.0f, 0.0f, 30.0f, 0.0f, 2, Resource->GetEffectMflashTexture(), EFFECT_NORMAL);
1193+ AddEffect(gx, gy, gz, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 40.0f, 0.0f, Resource->GetEffectMflashTexture(), 0, 0, 0.63f, 0.0f, EFFECT_NORMAL, 2);
11761194
11771195 //エフェクト(煙)の描画
1178- float rnd = DegreeToRadian(10)*GetRand(18);
1179- AddEffect(gx+1.0f, gy+1.0f, gz+1.0f, 0.1f, 0.2f, 0.1f, 50.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_ROTATION | EFFECT_TRANSLUCENT);
1180- AddEffect(gx-1.0f, gy-1.0f, gz-1.0f, -0.1f, 0.2f, -0.1f, 50.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_ROTATION | EFFECT_TRANSLUCENT);
1181- AddEffect(gx-1.0f, gy-1.0f, gz+1.0f, -0.1f, 0.2f, 0.1f, 50.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_ROTATION | EFFECT_TRANSLUCENT);
1182- AddEffect(gx+1.0f, gy+1.0f, gz-1.0f, 0.1f, 0.2f, -0.1f, 50.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_ROTATION | EFFECT_TRANSLUCENT);
1196+ AddEffect(gx, gy, gz, 0.0f, 0.1f, 0.0f, 0.0f,
1197+ DegreeToRadian(10)*GetRand(36), 0.0f, 36.0f, 0.2f, Resource->GetEffectSmokeTexture(), 220, 0, 0.6f, -0.01f, EFFECT_NORMAL, 50);
1198+ AddEffect(gx + ((float)GetRand(7)/10-0.3f), gy + ((float)GetRand(5)/10-0.2f), gz + ((float)GetRand(7)/10-0.3f), (float)GetRand(5)/10-0.2f, (float)GetRand(3)/10, (float)GetRand(5)/10-0.2f, 0.0f,
1199+ DegreeToRadian(10)*GetRand(36), 0.0f, ((float)GetRand(11)+25.0f)*2, 0.3f, Resource->GetEffectSmokeTexture(), 0, 0, 0.47f, -0.004f, EFFECT_NORMAL, 120);
1200+ AddEffect(gx + ((float)GetRand(13)/10-0.6f), gy + ((float)GetRand(11)/10-0.5f), gz + ((float)GetRand(13)/10-0.6f), (float)GetRand(7)/10-0.3f, (float)GetRand(7)/10-0.3f, (float)GetRand(7)/10-0.3f, 0.0f,
1201+ DegreeToRadian(10)*GetRand(36), DegreeToRadian(1), ((float)GetRand(21)+20.0f)*2, 0.2f, Resource->GetEffectSmokeTexture(), 0, 0, 0.4f, -0.004f, EFFECT_NORMAL, 100);
1202+ AddEffect(gx + ((float)GetRand(13)/10-0.6f), gy + ((float)GetRand(11)/10-0.5f), gz + ((float)GetRand(13)/10-0.6f), (float)GetRand(7)/10-0.3f, (float)GetRand(7)/10-0.3f, (float)GetRand(7)/10-0.3f, 0.0f,
1203+ DegreeToRadian(10)*GetRand(36), DegreeToRadian(-1), ((float)GetRand(21)+20.0f)*2, 0.2f, Resource->GetEffectSmokeTexture(), 0, 0, 0.4f, -0.004f, EFFECT_NORMAL, 100);
11831204
11841205 //効果音を再生
11851206 GameSound->GrenadeExplosion(gx, gy, gz, teamid);
@@ -1222,10 +1243,9 @@
12221243
12231244 //エフェクト(煙)の描画
12241245 float rnd = DegreeToRadian(10)*GetRand(18);
1225- AddEffect(hx+1.0f, hy+1.0f, hz+1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION);
1226- AddEffect(hx-1.0f, hy-1.0f, hz-1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION);
1227- AddEffect(hx-1.0f, hy-1.0f, hz+1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION);
1228- AddEffect(hx+1.0f, hy+1.0f, hz-1.0f, 0.0f, 0.05f, 0.0f, 10.0f, rnd*-1, (int)GAMEFPS * 3, Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION);
1246+ AddEffect(hx+1.0f, hy+1.0f, hz+1.0f, 0.1f, 0.05f, 0.1f, 0.0f, rnd, 0, GetRand(30)*0.1f+30.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 1.0f, -1.0f / (GAMEFPS * 3), EFFECT_NORMAL, (int)GAMEFPS * 3);
1247+ AddEffect(hx+1.0f, hy-1.0f, hz-1.0f, 0.2f, 0.05f, -0.2f, 0.0f, rnd*-1, 0, GetRand(30)*0.1f+30.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 1.0f, -1.0f / (GAMEFPS * 3), EFFECT_NORMAL, (int)GAMEFPS * 3);
1248+ AddEffect(hx-1.0f, hy-1.0f, hz-1.0f, -0.3f, 0.05f, -0.3f, 0.0f, rnd, 0, GetRand(30)*0.1f+30.0f, 0.1f, Resource->GetEffectSmokeTexture(), 10, 0, 1.0f, -1.0f / (GAMEFPS * 3), EFFECT_NORMAL, (int)GAMEFPS * 3);
12291249 }
12301250 }
12311251
@@ -2010,8 +2030,9 @@
20102030 int weapon_paramid;
20112031 WeaponParameter ParamData;
20122032 float x, y, z;
2013- float flashsize, smokesize, yakkyousize;
2014- float rx, mx, my, mz;
2033+ float flashsize, smokesize1, smokesize2, yakkyousize;
2034+ float rx, emx, emy, emz;
2035+ float mx, my, mz;
20152036
20162037 //人の座標と角度を取得
20172038 HumanIndex[humanid].GetPosData(&pos_x, &pos_y, &pos_z, NULL);
@@ -2023,18 +2044,24 @@
20232044
20242045 //マズルフラッシュと煙のサイズを決定
20252046 flashsize = 0.06f * ParamData.attacks;
2026- smokesize = flashsize;
2027- yakkyousize = 0.01f * ParamData.attacks;
2047+ smokesize1 = 0.04f * ParamData.attacks;
2048+ smokesize2 = 0.032f * ParamData.attacks;
2049+ yakkyousize = 0.012f * ParamData.attacks;
20282050 if( ParamData.silencer == true ){
2029- flashsize /= 2;
2051+ flashsize = 1.2f;
20302052 }
20312053
2032- //薬莢の移動量を決定
2054+ //煙の移動ベクトルを決定
20332055 rx = rotation_x*-1 + (float)M_PI/2;
2034- mx = cos(rx - (float)M_PI/2) * ParamData.yakkyou_sx /10;
2035- my = (ParamData.yakkyou_sy + (GetRand(3)-1)) /10;
2036- mz = sin(rx - (float)M_PI/2) * ParamData.yakkyou_sx /10;
2056+ emx = cos(rx)*cos(armrotation_y);
2057+ emy = sin(armrotation_y);
2058+ emz = sin(rx)*cos(armrotation_y);
20372059
2060+ //薬莢の移動量を決定
2061+ mx = cos(rx - (float)M_PI/2) * ParamData.yakkyou_sx * 0.12f;
2062+ my = (ParamData.yakkyou_sy + (GetRand(3)-1)) * 0.12f;
2063+ mz = sin(rx - (float)M_PI/2) * ParamData.yakkyou_sx * 0.12f;
2064+
20382065 //行列でエフェクト座標を計算
20392066 d3dg->SetWorldTransformHumanWeapon(pos_x, pos_y + 16.0f, pos_z, ParamData.flashx/10, ParamData.flashy/10, ParamData.flashz/10, rotation_x, armrotation_y*-1, 1.0f);
20402067 d3dg->GetWorldTransformPos(&x, &y, &z);
@@ -2041,7 +2068,7 @@
20412068 d3dg->ResetWorldTransform();
20422069
20432070 //マズルフラッシュ描画
2044- AddEffect(x, y, z, 0.0f, 0.0f, 0.0f, flashsize, DegreeToRadian(10)*GetRand(18), 1, Resource->GetEffectMflashTexture(), EFFECT_NORMAL);
2071+ AddEffect(x, y, z, 0.0f, 0.0f, 0.0f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, flashsize, 0.0f, Resource->GetEffectMflashTexture(), 0, 0, 0.63f, 0.0f, EFFECT_NORMAL, 1);
20452072
20462073 //行列でエフェクト座標を計算
20472074 d3dg->SetWorldTransformHumanWeapon(pos_x, pos_y + 16.0f, pos_z, ParamData.flashx/10, ParamData.flashy/10, ParamData.flashz/10 - 0.1f, rotation_x, armrotation_y*-1, 1.0f);
@@ -2049,7 +2076,8 @@
20492076 d3dg->ResetWorldTransform();
20502077
20512078 //エフェクト(煙)の描画
2052- AddEffect(x, y, z, 0.0f, 0.05f, 0.0f, smokesize, DegreeToRadian(10)*GetRand(18), (int)(GAMEFPS/3), Resource->GetEffectSmokeTexture(), EFFECT_DISAPPEAR | EFFECT_MAGNIFY | EFFECT_ROTATION);
2079+ AddEffect(x, y, z, emx*0.15f, emy*0.15f + 0.02f, emz*0.15f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, smokesize1, 0.3f, Resource->GetEffectSmokeTexture(), 0, 0, 0.47f, -0.047f, EFFECT_NORMAL, 12);
2080+ AddEffect(x, y, z, emx*0.45f, emy*0.45f, emz*0.45f, 0.0f, DegreeToRadian(10)*GetRand(36), 0.0f, smokesize2, 0.36f, Resource->GetEffectSmokeTexture(), 0, 0, 0.47f, -0.055f, EFFECT_NORMAL, 10);
20532081
20542082 //行列でエフェクト座標を計算
20552083 d3dg->SetWorldTransformHumanWeapon(pos_x, pos_y + 16.0f, pos_z, ParamData.yakkyou_px/10, ParamData.yakkyou_py/10, ParamData.yakkyou_pz/10, rotation_x, armrotation_y*-1, 1.0f);
@@ -2057,7 +2085,7 @@
20572085 d3dg->ResetWorldTransform();
20582086
20592087 //薬莢描画
2060- AddEffect(x, y, z, mx, my, mz, yakkyousize, DegreeToRadian(10)*GetRand(18), (int)(GAMEFPS/2), Resource->GetEffectYakkyouTexture(), EFFECT_ROTATION | EFFECT_FALL);
2088+ AddEffect(x, y, z, mx, my, mz, -0.15f, DegreeToRadian(10)*GetRand(36), DegreeToRadian(GetRand(61)-30), yakkyousize, 0.0f, Resource->GetEffectYakkyouTexture(), 0, 0, 1.0f, 0.0f, EFFECT_NORMAL, (int)(GAMEFPS*0.75f));
20612089 }
20622090
20632091 //! @brief 武器をリロード
@@ -2700,7 +2728,7 @@
27002728 int id, face;
27012729 float pos_x, pos_y, pos_z;
27022730 if( CollideBlood(&(EffectIndex[i]), &id, &face, &pos_x, &pos_y, &pos_z) == true ){
2703- AddMapEffect(id, face, pos_x, pos_y, pos_z, 10.0f, DegreeToRadian(10)*GetRand(18), (int)GAMEFPS * 20, Resource->GetEffectBloodTexture());
2731+ AddMapEffect(id, face, pos_x, pos_y, pos_z, 10.0f, DegreeToRadian(10)*GetRand(18), Resource->GetEffectBloodTexture(), 0, 0, 1.0f, -0.002f, (int)GAMEFPS * 20);
27042732 EffectIndex[i].SetEnableFlag(false);
27052733 }
27062734 else{
--- trunk/objectmanager.h (revision 237)
+++ trunk/objectmanager.h (revision 238)
@@ -79,7 +79,7 @@
7979 class smallobject *SmallObjectIndex; //!< 小物オブジェクト
8080 class bullet *BulletIndex; //!< 弾オブジェクト
8181 class grenade *GrenadeIndex; //!< 手榴弾オブジェクト
82- class effect *EffectIndex; //!< エフェクトオブジェクト
82+ class effect *EffectIndex; //!< エフェクトオブジェクト
8383
8484 unsigned int framecnt; //!< フレーム数のカウント
8585
@@ -110,7 +110,7 @@
110110 int AddHumanIndex(pointdata data, pointdata infodata, bool RandomFlag);
111111 int AddWeaponIndex(pointdata data);
112112 int AddSmallObjectIndex(pointdata data);
113- void SetHumanBlood(float x, float y, float z, int damage, bool CollideMap);
113+ void SetHumanBlood(float x, float y, float z, int damage, bool flowing);
114114 bool CollideHuman(human *in_humanA, human *in_humanB);
115115 bool CollideBullet(bullet *in_bullet);
116116 void HitBulletMap(float x, float y, float z, int teamID);
@@ -131,8 +131,8 @@
131131 int AddHumanIndex(float px, float py, float pz, float rx, int CharacterID, int TeamID, int WeaponID[]);
132132 int AddVisualWeaponIndex(int WeaponID, bool loadbullet);
133133 int AddSmallObjectIndex(float px, float py, float pz, float rx, int paramID, bool MapColl);
134- int AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float size, float rotation, int count, int texture, int settype);
135- int AddMapEffect(int id, int face, float pos_x, float pos_y, float pos_z, float size, float rotation, int count, int texture);
134+ int AddEffect(float pos_x, float pos_y, float pos_z, float move_x, float move_y, float move_z, float addmove_y, float rotation, float addrotation, float size, float addsize, int texture, int brightness, int addbrightness, float alpha, float addalpha, int settype, int count);
135+ int AddMapEffect(int id, int face, float pos_x, float pos_y, float pos_z, float size, float rotation, int texture, int brightness, int addbrightness, float alpha, float addalpha, int count);
136136 void LoadPointData();
137137 void Recovery();
138138 void SetAddCollisionFlag(bool flag);