@@ -567,56 +567,6 @@ BITMAP* ACrab::GetGraphicalIcon() const {
567
567
return m_GraphicalIcon ? m_GraphicalIcon : (m_pTurret ? m_pTurret->GetSpriteFrame (0 ) : GetSpriteFrame (0 ));
568
568
}
569
569
570
- bool ACrab::CollideAtPoint (HitData& hd) {
571
- return Actor::CollideAtPoint (hd);
572
-
573
- /*
574
- hd.ResImpulse[HITOR].Reset();
575
- hd.ResImpulse[HITEE].Reset();
576
- hd.HitRadius[HITEE] = (hd.HitPoint - m_Pos) * c_MPP;
577
- hd.mass[HITEE] = m_Mass;
578
- hd.MomInertia[HITEE] = m_pAtomGroup->GetMomentOfInertia();
579
- hd.HitVel[HITEE] = m_Vel + hd.HitRadius[HITEE].GetPerpendicular() * m_AngularVel;
580
- hd.VelDiff = hd.HitVel[HITOR] - hd.HitVel[HITEE];
581
- Vector hitAcc = -hd.VelDiff * (1 + hd.Body[HITOR]->GetMaterial().restitution * GetMaterial().restitution);
582
-
583
- float hittorLever = hd.HitRadius[HITOR].GetPerpendicular().Dot(hd.BitmapNormal);
584
- float hitteeLever = hd.HitRadius[HITEE].GetPerpendicular().Dot(hd.BitmapNormal);
585
- hittorLever *= hittorLever;
586
- hitteeLever *= hitteeLever;
587
- float impulse = hitAcc.Dot(hd.BitmapNormal) / (((1 / hd.mass[HITOR]) + (1 / hd.mass[HITEE])) +
588
- (hittorLever / hd.MomInertia[HITOR]) + (hitteeLever / hd.MomInertia[HITEE]));
589
-
590
- hd.ResImpulse[HITOR] = hd.BitmapNormal * impulse * hd.ImpulseFactor[HITOR];
591
- hd.ResImpulse[HITEE] = hd.BitmapNormal * -impulse * hd.ImpulseFactor[HITEE];
592
-
593
- ////////////////////////////////////////////////////////////////////////////////
594
- // If a particle, which does not penetrate, but bounces, do any additional
595
- // effects of that bounce.
596
- if (!ParticlePenetration())
597
- // TODO: Add blunt trauma effects here!")
598
- ;
599
- }
600
-
601
- m_Vel += hd.ResImpulse[HITEE] / hd.mass[HITEE];
602
- m_AngularVel += hd.HitRadius[HITEE].GetPerpendicular().Dot(hd.ResImpulse[HITEE]) /
603
- hd.MomInertia[HITEE];
604
- */
605
- }
606
-
607
- /*
608
- bool ACrab::OnBounce(const Vector &pos)
609
- {
610
- return false;
611
- }
612
-
613
-
614
- bool ACrab::OnSink(const Vector &pos)
615
- {
616
- return false;
617
- }
618
- */
619
-
620
570
bool ACrab::HandlePieCommand (PieSliceType pieSliceIndex) {
621
571
if (pieSliceIndex != PieSliceType::NoType) {
622
572
if (pieSliceIndex == PieSliceType::Reload) {
@@ -1423,29 +1373,6 @@ void ACrab::DrawHUD(BITMAP* pTargetBitmap, const Vector& targetPos, int whichScr
1423
1373
if (!m_HUDVisible) {
1424
1374
return ;
1425
1375
}
1426
- /*
1427
- // TODO: REMOVE< THIS IS TEMP
1428
- // Draw the AI paths
1429
- list<Vector>::iterator last = m_MovePath.begin();
1430
- Vector waypoint, lastPoint, lineVec;
1431
- for (list<Vector>::iterator lItr = m_MovePath.begin(); lItr != m_MovePath.end(); ++lItr)
1432
- {
1433
- lastPoint = (*last) - targetPos;
1434
- waypoint = lastPoint + g_SceneMan.ShortestDistance(lastPoint, (*lItr) - targetPos);
1435
- line(pTargetBitmap, lastPoint.m_X, lastPoint.m_Y, waypoint.m_X, waypoint.m_Y, g_RedColor);
1436
- last = lItr;
1437
- }
1438
- waypoint = m_MoveTarget - targetPos;
1439
- circlefill(pTargetBitmap, waypoint.m_X, waypoint.m_Y, 3, g_RedColor);
1440
- lastPoint = m_PrevPathTarget - targetPos;
1441
- circlefill(pTargetBitmap, lastPoint.m_X, lastPoint.m_Y, 2, g_YellowGlowColor);
1442
- lastPoint = m_DigTunnelEndPos - targetPos;
1443
- circlefill(pTargetBitmap, lastPoint.m_X, lastPoint.m_Y, 2, g_YellowGlowColor);
1444
- // Raidus
1445
- // waypoint = m_Pos - targetPos;
1446
- // circle(pTargetBitmap, waypoint.m_X, waypoint.m_Y, m_MoveProximityLimit, g_RedColor);
1447
- // TODO: REMOVE THIS IS TEMP
1448
- */
1449
1376
1450
1377
// Player AI drawing
1451
1378
@@ -1554,63 +1481,6 @@ void ACrab::DrawHUD(BITMAP* pTargetBitmap, const Vector& targetPos, int whichScr
1554
1481
}
1555
1482
m_HUDStack -= 9 ;
1556
1483
}
1557
-
1558
- // Print aim angle and rot angle stoff
1559
- /* {
1560
- std::snprintf(str, sizeof(str), "Aim %.2f Rot %.2f Lim %.2f", m_AimAngle, GetRotAngle(), m_AimRange + GetRotAngle());
1561
- pSmallFont->DrawAligned(&allegroBitmap, drawPos.m_X - 0, drawPos.m_Y + m_HUDStack + 3, str, GUIFont::Centre);
1562
-
1563
- m_HUDStack += -10;
1564
- }*/
1565
-
1566
- /*
1567
- // AI Mode select GUI HUD
1568
- if (m_Controller.IsState(AI_MODE_SET))
1569
- {
1570
- int iconOff = m_apAIIcons[0]->w + 2;
1571
- int iconColor = m_Team == Activity::TeamOne ? AIICON_RED : AIICON_GREEN;
1572
- Vector iconPos = GetCPUPos() - targetPos;
1573
-
1574
- if (m_AIMode == AIMODE_SENTRY)
1575
- {
1576
- std::snprintf(str, sizeof(str), "%s", "Sentry");
1577
- pSmallFont->DrawAligned(&allegroBitmap, iconPos.m_X, iconPos.m_Y - 18, str, GUIFont::Centre);
1578
- }
1579
- else if (m_AIMode == AIMODE_PATROL)
1580
- {
1581
- std::snprintf(str, sizeof(str), "%s", "Patrol");
1582
- pSmallFont->DrawAligned(&allegroBitmap, iconPos.m_X - 9, iconPos.m_Y - 5, str, GUIFont::Right);
1583
- }
1584
- else if (m_AIMode == AIMODE_BRAINHUNT)
1585
- {
1586
- std::snprintf(str, sizeof(str), "%s", "Brainhunt");
1587
- pSmallFont->DrawAligned(&allegroBitmap, iconPos.m_X + 9, iconPos.m_Y - 5, str, GUIFont::Left);
1588
- }
1589
- else if (m_AIMode == AIMODE_GOLDDIG)
1590
- {
1591
- std::snprintf(str, sizeof(str), "%s", "Gold Dig");
1592
- pSmallFont->DrawAligned(&allegroBitmap, iconPos.m_X, iconPos.m_Y + 8, str, GUIFont::Centre);
1593
- }
1594
-
1595
- // Draw the mode alternatives if they are not the current one
1596
- if (m_AIMode != AIMODE_SENTRY)
1597
- {
1598
- draw_sprite(pTargetBitmap, m_apAIIcons[AIMODE_SENTRY], iconPos.m_X - 6, iconPos.m_Y - 6 - iconOff);
1599
- }
1600
- if (m_AIMode != AIMODE_PATROL)
1601
- {
1602
- draw_sprite(pTargetBitmap, m_apAIIcons[AIMODE_PATROL], iconPos.m_X - 6 - iconOff, iconPos.m_Y - 6);
1603
- }
1604
- if (m_AIMode != AIMODE_BRAINHUNT)
1605
- {
1606
- draw_sprite(pTargetBitmap, m_apAIIcons[AIMODE_BRAINHUNT], iconPos.m_X - 6 + iconOff, iconPos.m_Y - 6);
1607
- }
1608
- if (m_AIMode != AIMODE_GOLDDIG)
1609
- {
1610
- draw_sprite(pTargetBitmap, m_apAIIcons[AIMODE_GOLDDIG], iconPos.m_X - 6, iconPos.m_Y - 6 + iconOff);
1611
- }
1612
- }
1613
- */
1614
1484
}
1615
1485
}
1616
1486
0 commit comments