summaryrefslogtreecommitdiffstats
path: root/src/render/Skidmarks.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2020-04-08 16:36:53 +0200
committeraap <aap@papnet.eu>2020-04-08 18:45:55 +0200
commit9176aef1b251fe08d536f69e383334015c94e146 (patch)
tree27f3979748ae701790a87ce701a87a75c6d9f9a7 /src/render/Skidmarks.cpp
parentimplemented CSkidmarks (diff)
parentfix bug (diff)
downloadre3-9176aef1b251fe08d536f69e383334015c94e146.tar
re3-9176aef1b251fe08d536f69e383334015c94e146.tar.gz
re3-9176aef1b251fe08d536f69e383334015c94e146.tar.bz2
re3-9176aef1b251fe08d536f69e383334015c94e146.tar.lz
re3-9176aef1b251fe08d536f69e383334015c94e146.tar.xz
re3-9176aef1b251fe08d536f69e383334015c94e146.tar.zst
re3-9176aef1b251fe08d536f69e383334015c94e146.zip
Diffstat (limited to 'src/render/Skidmarks.cpp')
-rw-r--r--src/render/Skidmarks.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/render/Skidmarks.cpp b/src/render/Skidmarks.cpp
index 87881fb9..41ee5d1d 100644
--- a/src/render/Skidmarks.cpp
+++ b/src/render/Skidmarks.cpp
@@ -8,8 +8,8 @@
CSkidmark CSkidmarks::aSkidmarks[NUMSKIDMARKS];
-RwImVertexIndex SkidmarkIndexList[16 * 6];
-RwIm3DVertex SkidmarkVertices[16 * 2];
+RwImVertexIndex SkidmarkIndexList[SKIDMARK_LENGTH * 6];
+RwIm3DVertex SkidmarkVertices[SKIDMARK_LENGTH * 2];
RwTexture *gpSkidTex;
RwTexture *gpSkidBloodTex;
RwTexture *gpSkidMudTex;
@@ -32,7 +32,7 @@ CSkidmarks::Init(void)
}
ix = 0;
- for(i = 0; i < 16; i++){
+ for(i = 0; i < SKIDMARK_LENGTH; i++){
SkidmarkIndexList[i*6+0] = ix+0;
SkidmarkIndexList[i*6+1] = ix+2;
SkidmarkIndexList[i*6+2] = ix+1;
@@ -42,7 +42,7 @@ CSkidmarks::Init(void)
ix += 2;
}
- for(i = 0; i < 16; i++){
+ for(i = 0; i < SKIDMARK_LENGTH; i++){
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 0], 0.0f);
RwIm3DVertexSetV(&SkidmarkVertices[i*2 + 0], i*5.01f);
RwIm3DVertexSetU(&SkidmarkVertices[i*2 + 1], 1.0f);
@@ -201,7 +201,7 @@ CSkidmarks::RegisterOne(uintptr id, CVector pos, float fwdX, float fwdY, bool *i
}
aSkidmarks[i].m_lastUpdate = CTimer::GetTimeInMilliseconds();
- if(aSkidmarks[i].m_last >= 15){
+ if(aSkidmarks[i].m_last >= SKIDMARK_LENGTH-1){
// No space to continue, end it
aSkidmarks[i].m_state = 2;
aSkidmarks[i].m_fadeStart = CTimer::GetTimeInMilliseconds() + 10000;