修复拉回问题
This commit is contained in:
parent
dd2500029d
commit
47b73eaccb
@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "gridservice.h"
|
||||
#include "room.h"
|
||||
|
||||
namespace cs
|
||||
{
|
||||
@ -49,6 +50,15 @@ class Entity
|
||||
a8::Vec2 GetPos() { return pos_; };
|
||||
void SetPos(a8::Vec2 pos)
|
||||
{
|
||||
#if 0
|
||||
if (room && entity_subtype == EST_Player) {
|
||||
if (room->frame_no > SERVER_FRAME_RATE * 35) {
|
||||
if (pos.Distance(pos_) > 500) {
|
||||
abort();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
pos_ = pos;
|
||||
}
|
||||
float GetX()
|
||||
|
@ -427,6 +427,7 @@ void Human::RecalcSelfCollider()
|
||||
|
||||
bool Human::IsCollisionInMapService()
|
||||
{
|
||||
Global::last_collider = nullptr;
|
||||
if (room->OverBorder(GetPos(), meta->i->radius())){
|
||||
return true;
|
||||
}
|
||||
@ -438,7 +439,6 @@ bool Human::IsCollisionInMapService()
|
||||
std::set<ColliderComponent*> colliders;
|
||||
room->map_service.GetColliders(GetX(), GetY(), colliders);
|
||||
|
||||
Global::last_collider = nullptr;
|
||||
for (ColliderComponent* collider : colliders) {
|
||||
switch (collider->owner->entity_type) {
|
||||
case ET_Obstacle:
|
||||
|
Loading…
x
Reference in New Issue
Block a user