Mercurial > mm7
comparison mm7_6.cpp @ 921:3696848c0413
meteorite rain and other spells fix
author | Ritor1 |
---|---|
date | Tue, 30 Apr 2013 20:08:42 +0600 |
parents | f3ccfc765502 |
children | d4ca429eecd4 a78f08dbeb88 |
comparison
equal
deleted
inserted
replaced
920:34ed2d5e7cfb | 921:3696848c0413 |
---|---|
1108 //UNDEF(v1); | 1108 //UNDEF(v1); |
1109 if ( p->vWorldViewPosition.x < 300.0 | 1109 if ( p->vWorldViewPosition.x < 300.0 |
1110 || (v2 = 300.0 < p[1].vWorldViewPosition.x, | 1110 || (v2 = 300.0 < p[1].vWorldViewPosition.x, |
1111 v3 = 0, | 1111 v3 = 0, |
1112 v4 = 300.0 == p[1].vWorldViewPosition.x, | 1112 v4 = 300.0 == p[1].vWorldViewPosition.x, |
1113 BYTE1(result) = HIBYTE(v1), | 1113 //BYTE1(result) = HIBYTE(v1), |
1114 !(v2 | v4)) ) | 1114 !(v2 | v4)) ) |
1115 { | 1115 { |
1116 if ( p->vWorldViewPosition.x < 300.0 ) | 1116 if ( p->vWorldViewPosition.x < 300.0 ) |
1117 { | 1117 { |
1118 v6 = 300.0 < p[1].vWorldViewPosition.x; | 1118 v6 = 300.0 < p[1].vWorldViewPosition.x; |
1119 v7 = 0; | 1119 v7 = 0; |
1120 v8 = 300.0 == p[1].vWorldViewPosition.x; | 1120 v8 = 300.0 == p[1].vWorldViewPosition.x; |
1121 BYTE1(result) = HIBYTE(v1); | 1121 //BYTE1(result) = HIBYTE(v1); |
1122 if ( !(v6 | v8) ) | 1122 if ( !(v6 | v8) ) |
1123 { | 1123 { |
1124 LOBYTE(result) = 0; | 1124 //LOBYTE(result) = 0; |
1125 return result; | 1125 return false; |
1126 } | 1126 } |
1127 } | 1127 } |
1128 v9 = 300.0 < p->vWorldViewPosition.x; | 1128 v9 = 300.0 < p->vWorldViewPosition.x; |
1129 v10 = 0; | 1129 v10 = 0; |
1130 v11 = 300.0 == p->vWorldViewPosition.x; | 1130 v11 = 300.0 == p->vWorldViewPosition.x; |
1131 BYTE1(result) = HIBYTE(v1); | 1131 //BYTE1(result) = HIBYTE(v1); |
1132 if ( v9 | v11 ) | 1132 if ( v9 | v11 ) |
1133 { | 1133 { |
1134 v16 = 1.0 / (p->vWorldViewPosition.x - p[1].vWorldViewPosition.x); | 1134 v16 = 1.0 / (p->vWorldViewPosition.x - p[1].vWorldViewPosition.x); |
1135 v17 = (p->vWorldViewPosition.y - p[1].vWorldViewPosition.y) * v16; | 1135 v17 = (p->vWorldViewPosition.y - p[1].vWorldViewPosition.y) * v16; |
1136 v18 = (p->vWorldViewPosition.z - p[1].vWorldViewPosition.z) * v16; | 1136 v18 = (p->vWorldViewPosition.z - p[1].vWorldViewPosition.z) * v16; |
1148 p->vWorldViewPosition.x = v15 + p->vWorldViewPosition.x; | 1148 p->vWorldViewPosition.x = v15 + p->vWorldViewPosition.x; |
1149 p->vWorldViewPosition.y = v13 * v15 + p->vWorldViewPosition.y; | 1149 p->vWorldViewPosition.y = v13 * v15 + p->vWorldViewPosition.y; |
1150 p->vWorldViewPosition.z = v15 * v14 + p->vWorldViewPosition.z; | 1150 p->vWorldViewPosition.z = v15 * v14 + p->vWorldViewPosition.z; |
1151 } | 1151 } |
1152 } | 1152 } |
1153 LOBYTE(result) = 1; | 1153 //LOBYTE(result) = 1; |
1154 return result; | 1154 return true; |
1155 } | 1155 } |
1156 | 1156 |
1157 //----- (004268E3) -------------------------------------------------------- | 1157 //----- (004268E3) -------------------------------------------------------- |
1158 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor) | 1158 int __fastcall _4268E3_smthn_to_a1r5g5b5(unsigned int uColor) |
1159 { | 1159 { |
4745 a1.uSectorID = 0; | 4745 a1.uSectorID = 0; |
4746 a1.vPosition.z = (int)((char *)_this + LODWORD(v725)); | 4746 a1.vPosition.z = (int)((char *)_this + LODWORD(v725)); |
4747 a1.uSpriteFrameID = 0; | 4747 a1.uSpriteFrameID = 0; |
4748 a1.spell_caster_pid = PID(OBJECT_Player, v3->uPlayerID); | 4748 a1.spell_caster_pid = PID(OBJECT_Player, v3->uPlayerID); |
4749 a1.spell_target_pid = v730; | 4749 a1.spell_target_pid = v730; |
4750 __debugbreak(); | 4750 //__debugbreak();//звездопад |
4751 a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges); | 4751 a1.field_60_distance_related_prolly_lod = stru_50C198._427546((int)&_this[69].uNumCharges); |
4752 a1.uFacing = v685; | 4752 a1.uFacing = v685; |
4753 a1.uSoundID = LOWORD(v3->sound_id); | 4753 a1.uSoundID = LOWORD(v3->sound_id); |
4754 if ( pParty->bTurnBasedModeOn == 1 ) | 4754 if ( pParty->bTurnBasedModeOn == 1 ) |
4755 a1.uAttributes = 4; | 4755 a1.uAttributes = 4; |