public int overlaps(SynchronizedObject param1, Room room)
        {
            List<int> _loc_8 = new List<int>();
            //int _loc_10 = 0;
            int _loc_11 = 0;
            if (param1.x < 16 || param1.y < 16 || param1.x >= room.Width * 16 || param1.y >= room.Height * 16)
            {
                //Console.WriteLine("returning 1, worldborder, " + name + " " + param1.x / 16 + " " + param1.y / 16);
                return 1;
            }
            //else
            //Console.WriteLine("NOT returning 1, worldborder, " + name + " " + param1.x / 16 + " " + param1.y / 16);
            //PhysicPlayer _loc_2 = (PhysicPlayer)this;

            if (this.isgod || this.ismod)
            {
                //Console.WriteLine("returning 0, isgod");
                return 0;
            }

            double _loc_3 = ((this.x) / 16);
            double _loc_4 = ((this.y) / 16);
            //double _loc_5 = (param1.x + param1.height) / 16;
            //Console.WriteLine(_loc_3 + " - "  +_loc_5);
            //double _loc_6 = (param1.y + param1.width) / 16;
            //bool _loc_7 = false;
            for (int xx = -2; xx < 1; xx++)
            {
                for (int yy = -2; yy < 1; yy++)
                {
                    if (_loc_3 + xx > 0 && _loc_3 + xx < room.Width && _loc_4 + yy > 0 && _loc_4 + yy <= room.Height)
                    {
                        for (int xTest = 0; xTest < 16; xTest++)
                        {
                            for (int yTest = 0; yTest < 16; yTest++)
                            {
                                if (hitTest((int)(xTest + this.x + xx * 16), (int)(yTest + this.y + yy * 16)))
                                {
                                    double _loc_9 = _loc_4;
                                    _loc_11 = room.getBlock(0, (int)(((xx * 16) + this.x + xTest) / 16), (int)(((yy * 16) + this.y + yTest) / 16)).BlockId;
                                    if (itemId.isSolid(_loc_11))
                                    {
                                        switch (_loc_11)
                                        {
                                            case 23:
                                                {
                                                    /*if (this.hideRed)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 24:
                                                {
                                                    /*if (this.hideGreen)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 25:
                                                {
                                                    /*if (this.hideBlue)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 26:
                                                {
                                                    /*if (!this.hideRed)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 27:
                                                {
                                                    /*if (!this.hideGreen)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 28:
                                                {
                                                    /*if (!this.hideBlue)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 156:
                                                {
                                                    /*if (this._hideTimedoor)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 157:
                                                {
                                                    /*if (!this._hideTimedoor)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -1://itemId.DOOR_PURPLE:
                                                {
                                                    /*if (this.hidePurple)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -2://itemId.GATE_PURPLE:
                                                {
                                                    /*if (!this.hidePurple)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -3://itemId.DOOR_CLUB:
                                                {
                                                    /*if (this.isclubmember)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -4://itemId.GATE_CLUB:
                                                {
                                                    /*if (!this.isclubmember)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -5://itemId.COINDOOR:
                                                {
                                                    /*if (this.getCoinValue(_loc_10, _loc_9) <= this.coins)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -6://itemId.COINGATE:
                                                {
                                                    /*if (this.getCoinValue(_loc_10, _loc_9) > this.showCoinGate)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -7://itemId.ZOMBIE_GATE:
                                                {
                                                    /*if (this.zombie)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case -8://itemId.ZOMBIE_DOOR:
                                                {
                                                    /*if (!this.zombie)
                                                    {
                                                        break;
                                                    }*/
                                                    break;
                                                }
                                            case 50:
                                                {
                                                    /*if (this.isme)
                                                    {
                                                        knownSecrets[_loc_10 + "x" + _loc_9] = true;
                                                    }*/
                                                    break;
                                                }
                                            case 61:
                                            case 62:
                                            case 63:
                                            case 64:
                                            case 89:
                                            case 90:
                                            case 91:
                                            case 96:
                                            case 97:
                                            case 122:
                                            case 123:
                                            case 124:
                                            case 125:
                                            case 126:
                                            case 127:
                                            case 146:
                                            case 154:
                                            case 158:
                                            case 194:
                                                {
                                                    if (this.speedY < 0 || _loc_9 <= this.overlapy)
                                                    {
                                                        if (_loc_9 != _loc_4 || this.overlapy == -1)
                                                        {
                                                            this.overlapy = (int)_loc_9;
                                                        }
                                                        //_loc_7 = true;
                                                        break;
                                                    }
                                                    break;
                                                }
                                            case 83:
                                            case 77:
                                                {
                                                    break;
                                                }
                                            default:
                                                {
                                                    break;
                                                }
                                        }
                                        return _loc_11;
                                    }
                                }
                            }
                        }
                    }
                }
            }

            //_loc_11 = Form1.blockMap[_loc_3, _loc_4].Id;
            /*while (_loc_9 < _loc_6)
            {

                _loc_8.Clear();
                for (int i = 0; i < Form1.worldSize.X; i++)
                {
                    _loc_8.Add(Form1.blockMap[i, _loc_9].Id);
                }
                _loc_10 = _loc_3;
                while (_loc_10 < _loc_5)
                {
                    if (_loc_8.Count != 0)
                    {
                        _loc_11 = _loc_8[_loc_10];
                        if (itemId.isSolid(_loc_11))
                        {
                            switch(_loc_11)
                            {
                                case 61:
                                case 62:
                                case 63:
                                case 64:
                                case 89:
                                case 90:
                                case 91:
                                case 96:
                                case 97:
                                case 122:
                                case 123:
                                case 124:
                                case 125:
                                case 126:
                                case 127:
                                case 146:
                                case 154:
                                case 158:
                                case 194:
                                {
                                    if (_loc_2.speedY < 0 || _loc_9 <= _loc_2.overlapy)
                                    {
                                        if (_loc_9 != _loc_4 || _loc_2.overlapy == -1)
                                        {
                                            _loc_2.overlapy = _loc_9;
                                        }
                                        _loc_7 = true;
                                        break;
                                    }
                                    break;
                                }
                                case 83:
                                case 77:
                                {
                                    break;
                                }
                                default:
                                {
                                    break;
                                }
                            }
                            if (_loc_11 != 9)
                            Console.WriteLine("returning " + _loc_11 + ", collision");
                            return _loc_11;
                        }
                    }
                    _loc_10++;
                }
                _loc_9++;
            }
            if (!_loc_7)
            {
                _loc_2.overlapy = -1;
            }*/
            return 0;
        }
 public PhysicsPlayer(int ID, string name, int frame, float xPos, float yPos, bool isGod, bool isMod, bool bla, int coins, bool purple, bool isFriend, int level)
     : base(null, 16)
 {
     //this.Ding = Player_Ding;
     //this.Crown = Player_Crown;
     //this.CrownSilver = Player_CrownSilver;
     //this.Aura = Player_Aura;
     //this.ModAura = Player_ModAura;
     //this.FireAura = Player_FireAura;
     //this.LevitationEffect = Player_LevitationEffect;
     //this.ding = new this.Ding();
     //this.crown = new this.Crown().bitmapData;
     //this.crown_silver = new this.CrownSilver().bitmapData;
     //this.aura = new this.Aura().bitmapData;
     //this.modaura = new this.ModAura().bitmapData;
     ///this.fireAura = new this.FireAura().bitmapData;
     //this.invulnerableAura = AnimationManager.animProtection;
     //this.levitationAnimaitonBitmapData = new this.LevitationEffect().bitmapData;
     //this.clubaura = AnimationManager.animClubAura;
     this.rect2 = new Rectangle(0, 0, 16, 26);
     //this.fireAnimation = new BlSprite(this.fireAura, 0, 0, 26, 26, 6);
     //this.protectionAnimation = new BlSprite(this.invulnerableAura, 0, 0, 26, 26, 24);
     //this.levitationAnimation = new BlSprite(this.levitationAnimaitonBitmapData, 0, 0, 26, 26, 32);
     this.queue = new Queue<int>(config.physics_queue_length);
     this.lastJump = new DateTime();
     this.lastPortal = new Point();
     this.that = this as SynchronizedObject;
     this.modrect = new Rectangle(0, 0, 64, 64);
     this.clubrect = new Rectangle(0, 0, 64, 64);
     //this.touchpotions = {};
     this._currentThrust = this._maxThrust;
     //super(ItemManager.smiliesBMD);
     //this.state = param5;
     //this.connection = param4;
     //this.world = param1;
     //this.hitmap = param1;
     this.x = 16;
     this.y = 16;
     this.isme = false;
     this.name = name;
     //this.chat = new Chat(param2.indexOf(" ") != -1 ? ("") : (param2));
     size = 16;
     width = 16;
     height = 16;
     return;
 }