mirror of
https://github.com/ptitSeb/Serious-Engine
synced 2024-11-25 03:40:26 +01:00
Added some Failsafe. Fixed a crash in the new game intro cinematic (when Boss of TFE die and Sam goes to the UFO) on the Pandora
This commit is contained in:
parent
6bb2f81134
commit
16d6cb99fa
5
Sources/Engine/Rendering/RendASER.cpp
Normal file → Executable file
5
Sources/Engine/Rendering/RendASER.cpp
Normal file → Executable file
|
@ -34,7 +34,6 @@ void CRenderer::AddAddListToActiveList(INDEX iScanLine)
|
|||
// allocate space in destination for sum of source and add
|
||||
INDEX ctActiveEdges = re_aaceActiveEdges.Count();
|
||||
re_aaceActiveEdgesTmp.Push(ctAddEdges+ctActiveEdges);
|
||||
|
||||
// check that the add list is sorted right
|
||||
#if ASER_EXTREME_CHECKING
|
||||
{
|
||||
|
@ -66,18 +65,18 @@ void CRenderer::AddAddListToActiveList(INDEX iScanLine)
|
|||
// start at begining of add list, source active list and destination active list
|
||||
LISTITER(CAddEdge, ade_lnInAdd) itadeAdd(lhAdd);
|
||||
CActiveEdge *paceSrc = &re_aaceActiveEdges[0];
|
||||
CActiveEdge *paceEnd = &re_aaceActiveEdges[re_aaceActiveEdges.Count()-1];
|
||||
CActiveEdge *paceDst = &re_aaceActiveEdgesTmp[0];
|
||||
|
||||
IFDEBUG(INDEX ctNewActive=0);
|
||||
IFDEBUG(INDEX ctOldActive1=0);
|
||||
IFDEBUG(INDEX ctOldActive2=0);
|
||||
|
||||
// for each edge in add list
|
||||
while(!itadeAdd.IsPastEnd()) {
|
||||
CAddEdge &ade = *itadeAdd;
|
||||
|
||||
// while the edge in active list is left of the edge in add list
|
||||
while (paceSrc->ace_xI.slHolder < itadeAdd->ade_xI.slHolder) {
|
||||
while ((paceSrc->ace_xI.slHolder < ade.ade_xI.slHolder) && (paceSrc!=paceEnd)) {
|
||||
// copy the active edge
|
||||
ASSERT(paceSrc<=&re_aaceActiveEdges[ctActiveEdges-1]);
|
||||
*paceDst++=*paceSrc++;
|
||||
|
|
Loading…
Reference in New Issue
Block a user