Mercurial > mm7
comparison mm7_1.cpp @ 1030:7735bdb3c30f
Doors and other bmodel triggers are now clickable.
author | Nomad |
---|---|
date | Tue, 21 May 2013 12:52:38 +0200 |
parents | 9ac94d00012e |
children | 39f42990698f 76ce871b0076 |
comparison
equal
deleted
inserted
replaced
1029:c94d6a37d298 | 1030:7735bdb3c30f |
---|---|
982 } | 982 } |
983 } | 983 } |
984 } | 984 } |
985 | 985 |
986 //----- (0042213C) -------------------------------------------------------- | 986 //----- (0042213C) -------------------------------------------------------- |
987 void __cdecl OnGameViewportClick() | 987 void OnGameViewportClick() |
988 { | 988 { |
989 signed int v0; // ebx@2 | 989 signed int v0; // ebx@2 |
990 POINT *v1; // esi@3 | 990 POINT *v1; // esi@3 |
991 signed int v2; // eax@9 | 991 signed int v2; // eax@9 |
992 BLVFace *v3; // eax@10 | 992 BLVFace *v3; // eax@10 |
1084 } | 1084 } |
1085 v11 = v14; | 1085 v11 = v14; |
1086 } | 1086 } |
1087 else | 1087 else |
1088 { | 1088 { |
1089 if ( PID_TYPE(v0) != OBJECT_BModel || (signed)v0 >= 0x2000000 ) | 1089 if ( PID_TYPE(v0) != OBJECT_BModel || HIWORD(v0) >= 512 ) |
1090 { | 1090 { |
1091 v4 = pParty->pPickedItem.uItemID; | 1091 v4 = pParty->pPickedItem.uItemID; |
1092 if ( !pParty->pPickedItem.uItemID ) | 1092 if ( !pParty->pPickedItem.uItemID ) |
1093 return; | 1093 return; |
1094 goto LABEL_14; | 1094 goto LABEL_14; |
1095 } | 1095 } |
1096 v2 = (signed int)(unsigned __int16)v0 >> 3; | 1096 v2 = PID_ID(v0); |
1097 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) | 1097 if ( uCurrentlyLoadedLevelType == LEVEL_Indoor) |
1098 { | 1098 { |
1099 v3 = &pIndoor->pFaces[v2]; | 1099 v3 = &pIndoor->pFaces[v2]; |
1100 if ( !(v3->uAttributes & 0x2000000) ) | 1100 if ( !(v3->uAttributes & 0x2000000) ) |
1101 { | 1101 { |
1158 } | 1158 } |
1159 v11 = pIndoor->pFaceExtras[v3->uFaceExtraID].uEventID; | 1159 v11 = pIndoor->pFaceExtras[v3->uFaceExtraID].uEventID; |
1160 } | 1160 } |
1161 else | 1161 else |
1162 { | 1162 { |
1163 v12 = &pOutdoor->pBModels[(signed int)(unsigned __int16)v0 >> 9].pFaces[v2 & 0x3F]; | 1163 v12 = &pOutdoor->pBModels[(signed int)(v0 & 0xFFFF) >> 9].pFaces[v2 & 0x3F]; |
1164 if ( !(v12->uAttributes & 0x2000000) ) | 1164 if ( !v12->Clickable()) |
1165 goto LABEL_11; | 1165 goto LABEL_11; |
1166 v11 = v12->sCogTriggeredID; | 1166 v11 = v12->sCogTriggeredID; |
1167 } | 1167 } |
1168 } | 1168 } |
1169 EventProcessor(v11, (unsigned __int16)v0, 1); | 1169 EventProcessor(v11, (unsigned __int16)v0, 1); |
1186 } | 1186 } |
1187 if ( GetAsyncKeyState(VK_SHIFT) >= 0 ) | 1187 if ( GetAsyncKeyState(VK_SHIFT) >= 0 ) |
1188 { | 1188 { |
1189 if ( !v17->GetActorsRelation(0) && !(BYTE2(v17->uAttributes) & 8) ) | 1189 if ( !v17->GetActorsRelation(0) && !(BYTE2(v17->uAttributes) & 8) ) |
1190 { | 1190 { |
1191 if ( (unsigned int)v0 >= 0x2000000 ) | 1191 if ( HIWORD(v0) >= 512) |
1192 { | 1192 { |
1193 v4 = pParty->pPickedItem.uItemID; | 1193 v4 = pParty->pPickedItem.uItemID; |
1194 if ( !pParty->pPickedItem.uItemID ) | 1194 if ( !pParty->pPickedItem.uItemID ) |
1195 return; | 1195 return; |
1196 goto LABEL_14; | 1196 goto LABEL_14; |