mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix TextmapUnfixFlatOffsets
It had the right idea, it just literally did it wrong :P
This commit is contained in:
parent
ec83b73ee9
commit
1bbe90f659
1 changed files with 8 additions and 8 deletions
|
|
@ -2092,22 +2092,22 @@ static void TextmapUnfixFlatOffsets(sector_t *sec)
|
||||||
{
|
{
|
||||||
if (sec->floorpic_angle)
|
if (sec->floorpic_angle)
|
||||||
{
|
{
|
||||||
fixed_t pc = FINECOSINE(sec->floorpic_angle >> ANGLETOFINESHIFT);
|
fixed_t pc = FINECOSINE(sec->floorpic_angle>>ANGLETOFINESHIFT);
|
||||||
fixed_t ps = FINESINE(sec->floorpic_angle >> ANGLETOFINESHIFT);
|
fixed_t ps = -FINESINE (sec->floorpic_angle>>ANGLETOFINESHIFT);
|
||||||
fixed_t xoffs = sec->floor_xoffs;
|
fixed_t xoffs = sec->floor_xoffs;
|
||||||
fixed_t yoffs = sec->floor_yoffs;
|
fixed_t yoffs = sec->floor_yoffs;
|
||||||
sec->floor_xoffs = (FixedMul(xoffs, ps) % MAXFLATSIZE) + (FixedMul(yoffs, pc) % MAXFLATSIZE);
|
sec->floor_xoffs = (FixedMul(xoffs, pc) % MAXFLATSIZE) - (FixedMul(yoffs, ps) % MAXFLATSIZE);
|
||||||
sec->floor_yoffs = (FixedMul(xoffs, pc) % MAXFLATSIZE) - (FixedMul(yoffs, ps) % MAXFLATSIZE);
|
sec->floor_yoffs = (FixedMul(xoffs, ps) % MAXFLATSIZE) + (FixedMul(yoffs, pc) % MAXFLATSIZE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sec->ceilingpic_angle)
|
if (sec->ceilingpic_angle)
|
||||||
{
|
{
|
||||||
fixed_t pc = FINECOSINE(sec->ceilingpic_angle >> ANGLETOFINESHIFT);
|
fixed_t pc = FINECOSINE(sec->ceilingpic_angle>>ANGLETOFINESHIFT);
|
||||||
fixed_t ps = FINESINE(sec->ceilingpic_angle >> ANGLETOFINESHIFT);
|
fixed_t ps = -FINESINE (sec->ceilingpic_angle>>ANGLETOFINESHIFT);
|
||||||
fixed_t xoffs = sec->ceiling_xoffs;
|
fixed_t xoffs = sec->ceiling_xoffs;
|
||||||
fixed_t yoffs = sec->ceiling_yoffs;
|
fixed_t yoffs = sec->ceiling_yoffs;
|
||||||
sec->ceiling_xoffs = (FixedMul(xoffs, ps) % MAXFLATSIZE) + (FixedMul(yoffs, pc) % MAXFLATSIZE);
|
sec->ceiling_xoffs = (FixedMul(xoffs, pc) % MAXFLATSIZE) - (FixedMul(yoffs, ps) % MAXFLATSIZE);
|
||||||
sec->ceiling_yoffs = (FixedMul(xoffs, pc) % MAXFLATSIZE) - (FixedMul(yoffs, ps) % MAXFLATSIZE);
|
sec->ceiling_yoffs = (FixedMul(xoffs, ps) % MAXFLATSIZE) + (FixedMul(yoffs, pc) % MAXFLATSIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue