The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
NPC see through wall
Author Message
Crescens
Apprentice
*

Posts: 4
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Jan 2017
Reputation: 0



Post: #1
NPC see through wall
Hello guys, I had some issues with wall of stone, paralyze, X, and fire field which you can't attack a player when he's X on wall of stone, I fixed it, now I can do it, attack BUT I noticed monsters can attack/see you through some wall ( like house walls ) and players can use archer or even magic to hit through wall as well, how can I fix it ? ( Sphere 56.b )




Crescens
01-16-2017 11:37 PM
Find all posts by this user Like Post Quote this message in a reply
MirroR
Apprentice
*

Posts: 36
Likes Given: 4
Likes Received: 5 in 5 posts
Joined: Apr 2012
Reputation: 1

Resty of Abyss

Post: #2
RE: NPC see through wall
PHP Code:
[ITEMDEF 07a]
DEFNAME=i_wall_stone_7
TYPE
=T_WALL
CAN
=CAN_I_BLOCK
RESOURCES
=100 i_rock_plain
CATEGORY
=Buildings Walls
SUBSECTION
=Stone Wall 3
DESCRIPTION
=@
DUPELIST=07b,07c,07d,07e,07f,080,081,082,083,084,085,086,087,088,089,08a,08b,08c,08d,08e,08f,0364,0365

on
=@create
id i_wall_stone_8
dispid 080 

I hope it is correct.
(This post was last modified: 01-17-2017 04:06 AM by MirroR.)
01-17-2017 03:55 AM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes MirroR's post
Crescens
Apprentice
*

Posts: 4
Likes Given: 1
Likes Received: 0 in 0 posts
Joined: Jan 2017
Reputation: 0



Post: #3
RE: NPC see through wall
Hello MirroR,


I did it, it now "works" somehow better, but now I can't hit the player inside the X ( wall of stone ) I mean, where is supposed to reach the other player ( diagonal )
(This post was last modified: 01-24-2017 07:14 AM by Crescens.)
01-24-2017 07:08 AM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: NPC see through wall
this is a fix, not an issue

on really old sphere versions < 56b, the LOS check doesn't work correctly on diagonal positions, allowing the attacker get line of sight of the target traped inside the wall X. So there's no way to get line of sight to something on the other side of the wall, but sphere was incorrectly allowing the LOS

this bug got fixed on sphere 56b, making the LOS work correctly on diagonal checks, which will block the LOS to the char stuck inside the wall X

the same occur on fire field, because the char doesn't have LOS to the position inside the wall X, so it also can't cast spells targeting this blocked position

so maybe the only way to "unfix" this is enabling EF_NoDiagonalCheckLOS on sphere.ini to disable this diagonal checks, making sphere return the wrong result again. But honestly I highly don't recommend enable this setting, because disabling diagonal LOS checks will also bring many unwanted behaviors/exploits, like players using bow or casting spells through house walls, players killing NPCs on strategic locations between walls where the player can hit the NPC but the NPC can't hit the player, etc
01-24-2017 05:33 PM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)