Don't draw outside the screen.
authorlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Wed, 6 Dec 2006 13:24:54 +0000 (13:24 +0000)
committerlimb <limb@bc5cbbab-a4ec-0310-bb52-ff3d296db539>
Wed, 6 Dec 2006 13:24:54 +0000 (13:24 +0000)
git-svn-id: svn+ssh://svn/var/repos/curfender@569 bc5cbbab-a4ec-0310-bb52-ff3d296db539

main.cpp

index feecf34..4658a3d 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -289,7 +289,7 @@ int draw_object(game_object object, int drawlocation){
       offset = abs(drawlocation)-abs(620-object.y);  //left of player wrap correction
     };
     
-    if(object.active==1){
+    if(object.active==1&&object.x>=1&&object.x<=18&&offset>=0&&offset<=79){
       if(object.face==0){
        mvprintw(object.x,offset,"%s",object.line0);
       } else if(object.face==1){