Correst ghost position
This commit is contained in:
parent
4eb589d981
commit
5141a31770
2 changed files with 14 additions and 41 deletions
40
data
40
data
|
@ -131,38 +131,8 @@ details
|
|||
:]h0gI :}g0gI :|g1gI :f211 :|g3gI- :f211 :]g4gI- :f211 :;g0fJ :f251
|
||||
:-e5g :f413 :|g0hL
|
||||
:+018 :f213 :!v05 :f311
|
||||
#RLC1;00LC1;8bd6e314 0000475:0011:0199:0041:00a9:0051:0029:0091:0049:0041:0049:0041:0249:0091:0015:0031:0019:01a1:0049:0041:0119:0031:0069:0041:0049:0041:0059:0031:00d9:0031:00f9:0021:0155:0041:01d3:0061:0113:00f1:0043:00c1:0083:0051:0203:0021:0513:0031
|
||||
#RLC1;00LC1;8bd6e314 0000455:0011:0169:0041:00a9:0031:0049:00a1:0059:0051:0059:0031:01e9:0071:0045:0039:00e1:0019:00d1:0079:0041:0049:0021:0049:0031:0039:0031:0069:0071:0029:0041:00c3:0041:00e9:0021:0145:0041:0253:01b1:00b3:0051:00a9:0071:0073:0031:00a3:0021:03b3:0031:00a9:0021:0073:0021
|
||||
#RLCtiny5;00LCtiny5;5c14d8b6 0000306:00a1:0083:0041:0019:0051:0049:0041:0029:00a1:00c9:0051:0073:00e1:0019:00e1:0013:0211:0049:0051:0033:0051:0039:00c1:0023:00f1:0049:0041:0033:0071:0013:0041:0053:0061:0093:0041:0043:0041:0175:0041:00a3:0041:00b9:0021
|
||||
#BLCtiny5;
|
||||
#RLC3;00LC3;cb1b38e6 0000557:0011:00e9:0041:0043:0041:0110:0024:01d5:0021:0203:00b1:0113:0021:0063:0061:00d3:0041:00a3:0051:00d3:0021:0129:00b1:0123:0031:0039:0031:0023:0051:00d3:0031:0033:0061:0073:0061:01e3:00a1:00f3:00a1:00e5:0041:0039:0101:0093:0091:00b3:0051:0633:0031:0093:0031
|
||||
#BLC3;
|
||||
#RLCtiny2;00LCtiny2;833ee4b2 0000185:01f1:0070:0081:02d0:0114
|
||||
#BLCtiny2;
|
||||
#RLCtiny2;00LCtiny2;833ee4b2 0000174
|
||||
#RLCtiny2;00LCtiny2;833ee4b2 0000174
|
||||
#RLCtiny4;00LCtiny4;1787f12a 0000267:0221:0093:0091:00b3:0041:0033:0031:0043:0041:0033:0051:0063:01e2:00a3:00d1:0065:0059:0051:0043:0031:0063:00e1:0163:0031
|
||||
#BLCtiny4;
|
||||
#RLCtiny4;00LCtiny4;1787f12a 0000184:0011:00c9:0071:0133:0051:0073:00e1:0033:00f1:0053:00a1:0063:0071:0123:0041
|
||||
#RLCtiny1;00LCtiny1;7e39e006 0000347:0011:0319:0031:0169:0041:0159:00b1:01e3:0071:0073:0021:0043:0051:0095:0033:01a1:0073:0031:0063:0031:0363:0161:00f3:0091:0089:0031
|
||||
#BLCtiny1;
|
||||
#RLC3;00LC3;cb1b38e6 0000589:0011:0099:0041:0083:0031:0049:0031:00c0:0024:01a5:0021:00c9:0051:00d3:00a1:0093:0051:02b3:0031:0073:0011:0023:00a1:0109:01d1:00b3:0021:0059:00c8:0039:0021:0019:0018:0049:0031:0053:0061:0089:0031:0023:00b1:0039:0041:00d3:0031:0073:0081:00b3:0041:00e9:0011:0053:0071:0103:00c1:00e5:0041:00b9:0091:0063:0081:0103:0011:0363:0031:0083:0071:0053:0081
|
||||
#RLCbonus2;00LCbonus2;288d28fe 0001119:0011:0089:0061:0023:0101:0053:0081:0023:00a1:0220:0038:001c:0084:003c:00a0:0031:0013:00d2:004c:0090:0061:0013:0051:0050:0048:0031:0040:0101:0019:0051:00a3:0031:00f5:0041:0040:0042:002a:0012:0010:0062:0040:0048:0020:0032:0016:0052:0010:0049:0090:0052:0030:0014:002c:0070:0061:00a0:0022:00cc:0058:0020:0061:0043:0101:00b0:0022:0021:0013:0021:0023:0061:00a3:0091:0110:0031:0010:0032:0013:0042:0033:0042:013c:0094:0040:0083:0091:00c0:00e1:0143:0041:0049:0061:0033:0091:0039:0061:0133:00d1:0049:0111:0063:0071:0018:0109:0058:0089:0048:0030:0061:0053:00c1:0033:0042:0050:0022:0010:0011:00e2:0043:0011:0060:0052:0036:00f0:0018:0029:00c8:0160:00c8:0091:0050:00c1:0029:0060:0054:0158:0089:0068:0049:0028:0059:0031:0083:0121:0059:00c1:0073:0041:0039:0038:0119:0078:0089:0091:0063:0051:0253:0041:0060:0052:0053:0072:0063:0031:0073:0022:0133
|
||||
#BLCbonus2;
|
||||
#RLCtiny2;00LCtiny2;833ee4b2 0000262:0014:0a10:0031:00d0:0074
|
||||
#RLCtiny4;00LCtiny4;1787f12a 0000233:0121:0083:0091:0073:0061:0043:0031:0033:0041:0033:0061:00a3:0142:01b1:0129:0061:0159:0031:00f9:0051
|
||||
#RLCtiny1;00LCtiny1;ae1ab677 0000327:0011:0159:0031:00d3:0041:0039:0051:0113:0021:0099:0041:0129:00d1:0153:0041:0073:0051:0043:0041:0023:0071:0023:0021:0055:0031:0013:00c1:0033:01a1:00c9:0031:01a5:0031:01b3:0041:00e9:0031:0043:0041:0049
|
||||
#RLC1;00LC1;8bd6e314 0000566:0011:0169:0031:0109:0081:0039:0051:0039:0051:0039:0051:00b9:0011:0069:0031:0119:0091:0025:0041:0083:0132:0033:0361:00d9:0101:00d9:0081:0269:0021:00a9:0021:01a5:0031:01f3:0031:0103:0031:0023:00b1:0033:00c1:0023:0071:0063:0021:0053:0071:0189:0021
|
||||
#BLC1;
|
||||
#RLC1;00LC1;8bd6e314 0000527:0011:0149:0041:0039:0031:00b9:0031:0079:00a1:02d9:0081:0035:0031:0049:0271:0073:00a1:0043:0041:0099:0061:00a9:0091:0119:0031:0063:0041:0079:0031:0145:0041:0053:0171:00d3:0041:0083:0041:0043:00e1:0023:00a1:01c9:0081:0083:0051:0099:0011:0399:0031:00f3:0031:0069:0031
|
||||
#RLC1;00LC1;8bd6e314 0000523:0011:0139:0031:0159:00a1:0049:0031:00a9:0061:0089:0041:0049:0021:0119:0071:0025:0031:0039:01e1:0043:00a1:0059:0031:0073:0021:0049:0061:0059:0041:0043:01e1:0089:0061:00b9:0021:00d9:0021:0453:0141:00b3:0091:0119:0031:00c9:0041:03b9:0021:0093:0031:00f9:0021:0039:0021
|
||||
#RLCtiny4;00LCtiny4;1787f12a 0000122:0011:01f9:0101:0093:00b1:0073:0051:00f9:0051:0073:0041
|
||||
#RLCtiny4;00LCtiny4;1787f12a 0000109:0141:0099:00e1:0149:0041:01e9:0011
|
||||
#RLCtiny4;00LCtiny4;1787f12a 0000107:00f1:0079:0041:0039:0091:0089:0061:0099:0041:0069:0021:0059:0021
|
||||
#RLCtiny4;00LCtiny4;343017ba 0000146:01e1:00b9:00d1:0099:0051:0109:0021
|
||||
#RLCtiny4;00LCtiny4;343017ba 0000123:0011:0023:00c1:0029:0101:0049:0041:0039:0051:0049:0031
|
||||
#RLCtiny4;00LCtiny4;343017ba 0000137:0013:0131:0019:0191:0093:0041:0129:0011:0319
|
||||
#RLCtiny4;00LCtiny4;343017ba 0000120:0011:00f9:0051:0029:0091:0059:0041:0049:0031:00b9:0031:02e9
|
||||
#RLCtiny4;00LCtiny4;343017ba 0000118:0011:0099:0021:0039:00c1:00d9:0061:0049:0031:0383
|
||||
#RLCtiny2;00LCtiny2;833ee4b2 0000257:0464:00b0:0051:0100:0054:0070:0141:0050:0042:00c0:0094:0030:0194:00a0:0121
|
||||
#RLCtiny2;00LCtiny2;833ee4b2 0000257:0464:00b0:0051:0100:0054:0070:0141:0050:0042:00c0:0094:0030:0194:00a0:0121
|
||||
#RLC1;00LC1;8bd6e314 0000457:0011:0169:0051:0109:0061:0029:0051:0059:0041:0039:0021:0039:0031:0029:0031:0059:0021:0039:0031:00a9:0031:0029:0085:0041:00d9:00f1:0059:0041:0119:0031:0039:0041:0089:0021:0079:0031:00e9:0021:00c9:0021:00d5:0041:0293:0141:0013:0071:0113:0031:0113:0041
|
||||
#RLC2;00LC2;3c5ba5dd 0000792:0001:00a3:0061:01b9:0061:0105:0041:01f9:0031:0049:0041:0059:0041:0029:0061:00d3:0061:00b3:0091:0093:0061:0043:0021:0083:00c1:0483:0021:00a9:0031:00e5:0031:0083:0051:0023:0071:0063:00b1:0053:0031:0143:0051:0133:0021:00a9:0081:00a9:0041:0083:0061:01e3:0101:0053:0011:0073:0011:0099:0061:0093:0031:0173:00a2:0016:0202:003c:0070:0042:0033:0121:0059:0071:0033:0181:0039:0071:0073:0051:0113:0021:0179:0031:0093:0031:0069:0031:00e9:0021
|
||||
#RLC3;00LC3;cb1b38e6 0000482:0011:02a5:0024:0135:0051:0153:0051:0043:00b1:0063:0031:0243:0041:0083:0061:0179:0141:0143:0031:0083:0031:00d3:0061:0073:0011:0063:00a1:01b3:0091:0093:00d1:0049:0058:0099:0061:0183:0061:00c9:0041:0105:0041:0199:0031:0089:0011
|
||||
#RLCtiny4;00LCtiny4;f999f0ec 0000216:0013:01d1:0059:0041:0093:0041:0069:0241:0085:0041:0179:0041:01a3:0031
|
||||
#RLCtiny1;00LCtiny1;ae1ab677 0000311:0011:00a3:0041:0209:0031:0049:0041:01e9:0081:0015:0031:0029:0041:0193:0031:00b3:0041:0053:0021:0053:00b7:0025:0021:00d3:0121:00c3:0031:00b5:0031:01e9:0021:00b9:0031
|
||||
|
|
15
game.h
15
game.h
|
@ -361,6 +361,7 @@ struct
|
|||
uint8_t stretch; /**< Stretch of the base sample step, as a bit shift
|
||||
(i.e. 1 means the step will be 2x as long etc.). This
|
||||
is to allow ghosts for even long replays. */
|
||||
int16_t offset[3]; ///< Small correcting position offset.
|
||||
} ghost;
|
||||
#endif
|
||||
|
||||
|
@ -538,7 +539,7 @@ void LCR_gameGhostGetTransform(uint32_t frame,
|
|||
for (int i = 0; i < 3; ++i)
|
||||
{
|
||||
position[i] = position[i] + ((carTransform[i] - position[i]) * n) /
|
||||
LCR_SETTING_GHOST_STEP;
|
||||
LCR_SETTING_GHOST_STEP + LCR_game.ghost.offset[i];
|
||||
|
||||
// rotations are a bit harder to interpolate (e.g. 1 -> 359 deg.)
|
||||
carTransform[3 + i] -= rotation[i];
|
||||
|
@ -554,11 +555,6 @@ void LCR_gameGhostGetTransform(uint32_t frame,
|
|||
/ LCR_SETTING_GHOST_STEP)) % LCR_GAME_UNIT;
|
||||
}
|
||||
}
|
||||
|
||||
// offset (correct rounding down):
|
||||
position[0] += LCR_GAME_UNIT / 16;
|
||||
position[1] += LCR_GAME_UNIT / 16;
|
||||
position[2] += LCR_GAME_UNIT / 16;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -635,6 +631,13 @@ void _LCR_gamePrepareGhost(void)
|
|||
*currentSample = *(currentSample - LCR_GHOST_SAMPLE_SIZE);
|
||||
currentSample++;
|
||||
}
|
||||
|
||||
LCR_gameGetNthGhostSample(0,carTransform,carTransform + 3);
|
||||
|
||||
for (int i = 0; i < 3; ++i)
|
||||
LCR_game.ghost.offset[i] = (((((int) LCR_currentMap.startPos[i]) -
|
||||
LCR_MAP_SIZE_BLOCKS / 2) * LCR_GAME_UNIT + LCR_GAME_UNIT / 2)
|
||||
/ (i == 1 ? 2 : 1)) - carTransform[i];
|
||||
}
|
||||
|
||||
LCR_GameUnit LCR_carSpeedKMH(void)
|
||||
|
|
Loading…
Reference in a new issue