1
This commit is contained in:
parent
0c6a2b6f6d
commit
cf6ac96828
@ -986,9 +986,6 @@ float Bullet::GetHitRadius()
|
||||
hit_radius = GetExplosionRange();
|
||||
}
|
||||
}
|
||||
if (room->IsNewBieRoom()) {
|
||||
hit_radius += 3;
|
||||
}
|
||||
return hit_radius;
|
||||
}
|
||||
|
||||
|
@ -8,6 +8,7 @@
|
||||
#include "creature.h"
|
||||
#include "obstacle.h"
|
||||
#include "roomobstacle.h"
|
||||
#include "room.h"
|
||||
|
||||
#include "mt/Map.h"
|
||||
#include "mt/MapThing.h"
|
||||
@ -15,16 +16,20 @@
|
||||
bool Collision::CheckBullet(IBullet* bullet, Creature* c)
|
||||
{
|
||||
glm::vec3 bullet_real_pos = bullet->GetPos().ToGlmVec3() - bullet->GetDir() * bullet->GetHitRadius();
|
||||
float bullet_hit_radius = bullet->GetHitRadius();
|
||||
if (c->room->IsNewBieRoom()) {
|
||||
bullet_hit_radius += 3;
|
||||
}
|
||||
bool ret = a8::IntersectCylinderCylinder
|
||||
(
|
||||
bullet_real_pos, bullet->GetHitRadius() * 1.0, 10,
|
||||
bullet_real_pos, bullet_hit_radius * 1.0, 10,
|
||||
c->GetPos().ToGlmVec3(), c->GetHitRadius(), 10
|
||||
);
|
||||
if (!ret) {
|
||||
bullet_real_pos = bullet->GetPos().ToGlmVec3() - bullet->GetDir() * (bullet->GetHitRadius() - 2);
|
||||
ret = a8::IntersectCylinderCylinder
|
||||
(
|
||||
bullet_real_pos, bullet->GetHitRadius() * 1.0, 10,
|
||||
bullet_real_pos, bullet_hit_radius * 1.0, 10,
|
||||
c->GetPos().ToGlmVec3(), c->GetHitRadius(), 10
|
||||
);
|
||||
}
|
||||
|
@ -866,7 +866,7 @@ void RoomMgr::SetMatchMode(int mode)
|
||||
|
||||
void RoomMgr::AdjustCMJoin(cs::CMJoin* msg)
|
||||
{
|
||||
#if 0
|
||||
#if 1
|
||||
#ifdef DEBUG
|
||||
#ifdef NEWBIE_ROOM
|
||||
msg->set_force_enter_newbie_room(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user