trace from actor center
This commit is contained in:
parent
b862adb747
commit
91fb87e95e
10 changed files with 52 additions and 10 deletions
|
|
@ -294,10 +294,21 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
SetSplitPlanes(state, topp, bottomp);
|
||||
}
|
||||
|
||||
if(actor)
|
||||
{
|
||||
state.SetActorCenter(actor->X(), actor->Center(), actor->Y());
|
||||
}
|
||||
|
||||
if (!modelframe)
|
||||
{
|
||||
state.SetLightNoNormals(true);
|
||||
state.SetNormal(0, 0, 0);
|
||||
|
||||
if(actor && gl_spritelight < 2)
|
||||
{
|
||||
state.SetUseSpriteCenter(true);
|
||||
}
|
||||
|
||||
CreateVertices(di, state);
|
||||
|
||||
if (polyoffset)
|
||||
|
|
@ -305,7 +316,6 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
state.SetDepthBias(-1, -128);
|
||||
}
|
||||
|
||||
state.SetLightNoNormals(true);
|
||||
state.SetLightIndex(dynlightindex);
|
||||
state.Draw(DT_TriangleStrip, vertexindex, 4);
|
||||
state.SetLightIndex(-1);
|
||||
|
|
@ -320,6 +330,7 @@ void HWSprite::DrawSprite(HWDrawInfo *di, FRenderState &state, bool translucent)
|
|||
state.SetTextureMode(TM_NORMAL);
|
||||
}
|
||||
state.SetLightNoNormals(false);
|
||||
state.SetUseSpriteCenter(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue