Sphereserver / Source-X

Ultima Online server emulator
Apache License 2.0
58 stars 47 forks source link

ALLOWHITFROMSHIP #470

Open xMirroRx opened 4 years ago

xMirroRx commented 4 years ago

// COMBAT_ALLOWHITFROMSHIP 00040 // Allow attacking opponents from ships COMBATFLAGS = 040

spells, arrows, etc..

this flag does not seem to work.

Jhobean commented 4 years ago

Don't seem the problem came from there.

When your hit are block because of this settting, you should have a message. Would you give more details?

xMirroRx commented 4 years ago

Example: Cannot use magic, arrow, etc. attacks from one ship to an enemy on another ship.

Jhobean commented 4 years ago

I think the bug is more LOS bug... I tested te setting HITfrom ship and work very well. When your hit is block by this setting, you have a message: image

Look on the picture, I removed 1 piece of ship for having my LOS. I think the bug is more on LOS formula where t_ship part should allow LOS

Jhobean commented 4 years ago

I checked the core to see why ship part block the los.

All happen HERE: https://github.com/Sphereserver/Source-X/blob/520f2fbf83e4b44aff7c8de01f9483c99f98bdad/src/game/chars/CCharLOS.cpp#L81

image

Don't think on fiddler Ship suppose to block LOS

on the Core it's clear FLAG CAN_I_BLOCK is there image

Would like to add some restriction with this somewhere: if (pItem->IsType(IT_SHIP_PLANK) || pItem->IsType(IT_SHIP_SIDE) || pItem->IsType(IT_SHIP_SIDE_LOCKED))

Jhobean commented 4 years ago

Here You go! Activate advance LOS on the ini and you will be able to shoot on ship:

// Uses the new LoS algorithm
// ADVANCEDLOS_DISABLED   00 // Disabled, use the old method
// ADVANCEDLOS_PLAYER     01 // Enabled only for players
// ADVANCEDLOS_NPC        02 // Enabled only for NPCs
AdvancedLos=01

Will be cool to have the option without advance LOS too

Soulless-1 commented 2 months ago

requiring LOS will prevent the majority of attacks from happening to targets outside your ship. 99% of boat fights will be magery, archery, thrown objects, and potions. this essentially makes ship combat impossible without some type of cannon system and renders this setting unusable unless the shard has melee weapons that will hit things many tiles away.